Concept for checking that a UART driver exposes the right interface.
More...
#include <uart.hh>
template<typename T>
concept IsUart =
requires(
volatile T *v, uint8_t byte) {
{ v->init() };
{ v->can_write() } -> std::same_as<bool>;
{ v->can_read() } -> std::same_as<bool>;
{ v->blocking_read() } -> std::same_as<uint8_t>;
{ v->blocking_write(byte) };
}
Concept for checking that a UART driver exposes the right interface.
Concept for checking that a UART driver exposes the right interface.
Definition at line 13 of file uart.hh.