forked from ROMEO/obsw
uart1 IO
This commit is contained in:
@ -27,6 +27,7 @@ int hw_device_open(const char *path, size_t path_len) {
|
||||
return UART_0;
|
||||
}
|
||||
if (compare_string_chars("uart1", path, path_len) == 1) {
|
||||
uart1_enable_receiver();
|
||||
return UART_1;
|
||||
}
|
||||
|
||||
@ -67,7 +68,7 @@ int hw_interface_read(int fd, char *ptr, int len) {
|
||||
case UART_0:
|
||||
return uart0_read(ptr,len);
|
||||
case UART_1:
|
||||
return 0;
|
||||
return uart1_read(ptr,len);;
|
||||
}
|
||||
return -1;
|
||||
}
|
Reference in New Issue
Block a user