int _write (int fd, char *ptr, int len) { char *p = ptr; int res = UART_SUCCESS; (void)fd; (void)len; while (*p != '\n') { UART.WriteChar(*p++); if (res != UART_SUCCESS) { break; } } if(*p == '\n') { UART.WriteChar('\r'); UART.WriteChar('\n'); } return res; }
int _read(int fd, char *ptr, int len) { (void)fd; (void)len; while(read_ch == false); *ptr = Rx_char; UART.WriteChar(*ptr); printf("\n"); read_ch = false; return 1; }