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