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

@@ -3,17 +3,8 @@
#include <span>
#include <string_view>
#include "async.h"
#include "buffer.h"
void InitUarts();
async::task<buffer> UartRead(int size);
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()}));
}
// block until the provided buffer is full
void UartReadBlocking(std::span<std::byte> data);
inline uint8_t UartReadByteBlocking() {