This commit is contained in:
2024-08-29 14:48:16 +02:00
parent 8e7424bb2f
commit 5ad8853fef
5 changed files with 127 additions and 16 deletions

View File

@ -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;
}