update uart read for lpc18/43 for testing
This commit is contained in:
@@ -103,7 +103,8 @@ TU_ATTR_USED int sys_write (int fhdl, const void *buf, size_t count)
|
||||
TU_ATTR_USED int sys_read (int fhdl, char *buf, size_t count)
|
||||
{
|
||||
(void) fhdl;
|
||||
return SEGGER_RTT_Read(0, buf, count);
|
||||
int rd = (int) SEGGER_RTT_Read(0, buf, count);
|
||||
return (rd > 0) ? rd : -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -143,7 +144,8 @@ TU_ATTR_USED int sys_write (int fhdl, const void *buf, size_t count)
|
||||
TU_ATTR_USED int sys_read (int fhdl, char *buf, size_t count)
|
||||
{
|
||||
(void) fhdl;
|
||||
return board_uart_read((uint8_t*) buf, (int) count);
|
||||
int rd = board_uart_read((uint8_t*) buf, (int) count);
|
||||
return (rd > 0) ? rd : -1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user