arm: separate async stuff from main uart
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user