2022-05-10 18:20:02 +00:00
|
|
|
#pragma once
|
|
|
|
|
2022-05-17 03:56:25 +00:00
|
|
|
#include <span>
|
|
|
|
#include <string_view>
|
|
|
|
|
2022-05-10 18:20:02 +00:00
|
|
|
#include "xuartlite.h"
|
|
|
|
|
|
|
|
extern XUartLite* uart0;
|
|
|
|
|
|
|
|
void InitUarts();
|
2022-05-17 03:56:25 +00:00
|
|
|
|
|
|
|
// blocking
|
|
|
|
void UartSend(std::span<const std::byte> data);
|
|
|
|
inline void UartSend(std::string_view s) {
|
|
|
|
return UartSend(std::as_bytes(std::span{s.data(), s.size()}));
|
|
|
|
}
|
|
|
|
void UartSendCrash(std::span<const std::byte> data);
|
|
|
|
inline void UartSendCrash(std::string_view s) {
|
|
|
|
return UartSendCrash(std::as_bytes(std::span{s.data(), s.size()}));
|
|
|
|
}
|
|
|
|
|
|
|
|
void HandleUartTxFromIsr(void*, unsigned int transmitted);
|