How do you control echoing of chars with getchar() etc?
Posted: Fri Mar 13, 2009 3:21 pm
				
				My app is echoing every char that getchar() receives.  I don't want them to be echoed, how can I avoid this?  I've tried ioctl() but can't get it to make any difference.  Any sample code would be appreciated.  I'm using:
SerialClose( 0 ); // close UART 0
fdSerial = OpenSerial( 0, 115200, 1, 8, eParityNone );
ReplaceStdio( 0, fdSerial ); // stdin
ReplaceStdio( 1, fdSerial ); // stdout
ReplaceStdio( 2, fdSerial ); // stderr
I've tried:
ioctl(fdSerial,8); //IOCTL_RX_ECHO (8) When set echo chars received to tx
Of ioctl() the manual says: "The ioctl command consists of IOCTL_SET or IOCTL_CLR and the bit of the associated options. "
but I don't know how to use IOCTL_SET or IOCTL_CLR.
Thanks,
Sam
			SerialClose( 0 ); // close UART 0
fdSerial = OpenSerial( 0, 115200, 1, 8, eParityNone );
ReplaceStdio( 0, fdSerial ); // stdin
ReplaceStdio( 1, fdSerial ); // stdout
ReplaceStdio( 2, fdSerial ); // stderr
I've tried:
ioctl(fdSerial,8); //IOCTL_RX_ECHO (8) When set echo chars received to tx
Of ioctl() the manual says: "The ioctl command consists of IOCTL_SET or IOCTL_CLR and the bit of the associated options. "
but I don't know how to use IOCTL_SET or IOCTL_CLR.
Thanks,
Sam