CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
Toggle main menu visibility
Loading...
Searching...
No Matches
sdk
include
platform
concepts
uart.hh
1
// Copyright Microsoft and CHERIoT Contributors.
2
// SPDX-License-Identifier: MIT
3
4
#pragma once
5
6
#include <concepts>
7
#include <stdint.h>
8
9
/**
10
* Concept for checking that a UART driver exposes the right interface.
11
*/
12
template
<
typename
T>
13
concept
IsUart
=
requires
(
volatile
T *v, uint8_t byte) {
14
{ v->init() };
15
{ v->can_write() } -> std::same_as<bool>;
16
{ v->can_read() } -> std::same_as<bool>;
17
{ v->blocking_read() } -> std::same_as<uint8_t>;
18
{ v->blocking_write(
byte
) };
19
};
IsUart
Concept for checking that a UART driver exposes the right interface.
Definition
uart.hh:13
Generated by
1.18.0