synth/arm/uart.h

23 lines
530 B
C
Raw Normal View History

#pragma once
2022-05-17 03:56:25 +00:00
#include <span>
#include <string_view>
#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);