forked from ROMEO/obsw
cleanup
This commit is contained in:
@ -14,13 +14,25 @@ void rust_main();
|
||||
|
||||
void test_hardware() {
|
||||
int fd0 = hw_device_open("uart0", 5);
|
||||
write(fd0, "uart0\n", 6);
|
||||
write(fd0, "UART0\n", 6);
|
||||
int fd1 = hw_device_open("uart1", 5);
|
||||
write(fd1, "uart1\n", 6);
|
||||
|
||||
vTaskDelay(1 / portTICK_PERIOD_MS);
|
||||
|
||||
|
||||
uint8_t buffer[255];
|
||||
|
||||
|
||||
// for (int i = 0; i< sizeof(buffer); i++) {
|
||||
// buffer[i] = i;
|
||||
// }
|
||||
|
||||
// write(fd0, buffer, sizeof(buffer));
|
||||
|
||||
vTaskDelay(10 / portTICK_PERIOD_MS);
|
||||
|
||||
write(1, "got:\n", 5);
|
||||
|
||||
uint8_t buffer[100];
|
||||
int read_bytes = read(fd0, buffer, sizeof(buffer));
|
||||
write(1, buffer, read_bytes);
|
||||
read_bytes = read(fd1, buffer, sizeof(buffer));
|
||||
|
Reference in New Issue
Block a user