arm: separate async stuff from main uart

This commit is contained in:
2022-05-17 21:27:47 -07:00
parent c0cdb7a068
commit 8d81f4f9c4
4 changed files with 16 additions and 10 deletions

View File

@@ -6,6 +6,7 @@
#include "timer.h"
#include "trace.h"
#include "uart.h"
#include "uart_async.h"
namespace {
using async::AwaitableType;
@@ -38,7 +39,6 @@ void SetupTimer() {
timer0->SetupAsWdt(100000 * 4000);
timer0->EnableT1();
}
} // namespace
async::task<> echo() {
while (1) {
@@ -46,6 +46,7 @@ async::task<> echo() {
co_await UartWrite(buff.data);
}
}
} // namespace
int main() {
SetupUart();