diff options
| author | Keith Packard <keithp@keithp.com> | 2009-11-04 21:59:12 -0800 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2009-11-04 21:59:12 -0800 | 
| commit | 843ee489aac34ad6d81f55f1c85fb9eecc42d86b (patch) | |
| tree | 233b213b53dbb0b78f9bee4ad39347d10df4eadd /ao-tools/lib/cc-usb.c | |
| parent | 036400a2db303f3db3be7cc0426f88359c6bd2b1 (diff) | |
Flush pending input when switching to remote packet mode
Any pending input would just confuse the application, so pull it off
the link and dump it.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/lib/cc-usb.c')
| -rw-r--r-- | ao-tools/lib/cc-usb.c | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/ao-tools/lib/cc-usb.c b/ao-tools/lib/cc-usb.c index 9b3b831f..53a50741 100644 --- a/ao-tools/lib/cc-usb.c +++ b/ao-tools/lib/cc-usb.c @@ -378,7 +378,7 @@ void  cc_usb_open_remote(struct cc_usb *cc)  {  	if (!cc->remote) { -		cc_usb_printf(cc, "p\nE 0\n"); +		cc_usb_printf(cc, "\np\nE 0\n");  		do {  			cc->in_count = cc->in_pos = 0;  			_cc_usb_sync(cc, 100); @@ -419,7 +419,7 @@ cc_usb_open(char *tty)  	save_termios = termios;  	cfmakeraw(&termios);  	tcsetattr(cc->fd, TCSAFLUSH, &termios); -	cc_usb_printf(cc, "E 0\nm 0\n"); +	cc_usb_printf(cc, "\nE 0\nm 0\n");  	do {  		cc->in_count = cc->in_pos = 0;  		_cc_usb_sync(cc, 100); | 
