From 45990d9cfc73cc66828ae9ffe23c851cb32687c2 Mon Sep 17 00:00:00 2001 From: bushing Date: Sat, 24 Oct 2009 04:02:45 -0700 Subject: [PATCH] add \r to \n when output to usbgecko --- gecko.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gecko.c b/gecko.c index fc288ca..f249b01 100644 --- a/gecko.c +++ b/gecko.c @@ -143,6 +143,8 @@ static int gecko_sendbuffer(const void *buffer, u32 size) while(left>0) { if(!_gecko_sendbyte(*ptr)) break; + if(*ptr == '\n' && !_gecko_sendbyte('\r')) + break; ptr++; left--; } @@ -181,6 +183,8 @@ static int gecko_sendbuffer_safe(const void *buffer, u32 size) if(_gecko_checksend()) { if(!_gecko_sendbyte(*ptr)) break; + if(*ptr == '\n' && !_gecko_sendbyte('\r')) + break; ptr++; left--; }