mirror of
https://github.com/fail0verflow/mini.git
synced 2024-11-24 12:19:21 +01:00
add \r to \n when output to usbgecko
This commit is contained in:
parent
fde179edc5
commit
45990d9cfc
4
gecko.c
4
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--;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user