added poll api passthrough
This commit is contained in:
21
src/main.cpp
Normal file
21
src/main.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include <zephyr/kernel.h>
|
||||
#include <zephyr/device.h>
|
||||
#include <zephyr/drivers/uart.h>
|
||||
|
||||
const struct device *test_uart = DEVICE_DT_GET(DT_ALIAS(testuart));
|
||||
|
||||
|
||||
|
||||
int main(void) {
|
||||
|
||||
const char msg [] = "Hello World";
|
||||
|
||||
while (1) {
|
||||
for (char c : msg) {
|
||||
uart_poll_out(test_uart, c);
|
||||
}
|
||||
|
||||
k_sleep(K_MSEC(100));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user