@@ -25,6 +25,13 @@
|
||||
|
||||
#include "board.h"
|
||||
|
||||
#if defined(__MSP430__)
|
||||
#define sys_write write
|
||||
#define sys_read read
|
||||
#else
|
||||
#define sys_write _write
|
||||
#define sys_read _read
|
||||
#endif
|
||||
//--------------------------------------------------------------------+
|
||||
// MACRO TYPEDEF CONSTANT ENUM DECLARATION
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -44,13 +51,13 @@
|
||||
|
||||
// newlib read()/write() retarget
|
||||
|
||||
TU_ATTR_USED int _write (int fhdl, const void *buf, size_t count)
|
||||
TU_ATTR_USED int sys_write (int fhdl, const void *buf, size_t count)
|
||||
{
|
||||
(void) fhdl;
|
||||
return board_uart_write(buf, count);
|
||||
}
|
||||
|
||||
TU_ATTR_USED int _read (int fhdl, char *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, count);
|
||||
|
Reference in New Issue
Block a user