mbv: add async app, sorta works

This commit is contained in:
2025-06-24 23:04:13 -07:00
parent afba9e168f
commit 849cf7b7a1
16 changed files with 1073 additions and 2 deletions

View File

@@ -0,0 +1,15 @@
#pragma once
#include <span>
#include <string_view>
#include "async.h"
#include "buffer.h"
async::task<buffer> UartRead(int size);
async::task<uint8_t> UartReadLoop();
async::task<> UartWrite(std::span<const std::byte> data);
inline async::task<> UartWrite(std::string_view s) {
co_await UartWrite(std::as_bytes(std::span{s.data(), s.size()}));
}
async::task<> UartWriteLoop(async::gimme<std::span<const std::byte>>& data);