|
@ -21,7 +21,13 @@ using namespace iflytop; |
|
|
|
|
|
|
|
|
int main(int argc, char const* argv[]) { |
|
|
int main(int argc, char const* argv[]) { |
|
|
Uart uart; |
|
|
Uart uart; |
|
|
uart.open(UART_NAME, "115200"); |
|
|
|
|
|
|
|
|
int ret = uart.open(UART_NAME, "115200"); |
|
|
|
|
|
if (ret != 0) { |
|
|
|
|
|
perror("open uart error"); |
|
|
|
|
|
exit(1); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
thread th([&]() { |
|
|
thread th([&]() { |
|
|
//
|
|
|
//
|
|
|