|
CHERIoT RTOS
A compartmentalised RTOS for CHERIoT hardware
|
OpenTitan UART. More...
#include <platform-uart.hh>


Classes | |
| struct | Interrupts |
| struct | InterruptState |
| struct | Control |
| struct | Status |
| struct | FIFOControl |
| struct | FIFOStatus |
| UART FIFO Status Register. More... | |
Public Member Functions | |
| void | parity (bool enableParity=true, bool oddParity=false) volatile |
| Configure parity. | |
| void | loopback (bool systemLoopback=true, bool lineLoopback=false) volatile |
| Configure loopback. | |
| void | fifos_clear () volatile |
| Clears the contents of the receive and transmit FIFOs. | |
| void | transmit_watermark (FIFOControl::TransmitWatermark level) volatile |
| Sets the level transmit watermark. | |
| void | receive_watermark (FIFOControl::ReceiveWatermark level) volatile |
| Sets the level receive watermark. | |
| template<typename Interrupt> | |
| void | interrupt_enable () volatile |
| Enable the given interrupt by name. | |
| template<typename Interrupt> | |
| void | interrupt_disable () volatile |
| Disable the given interrupt by name. | |
| void | interrupt_enable (Interrupts interrupt) volatile |
| Enable the given interrupt(s) by value. | |
| void | interrupt_disable (Interrupts interrupt) volatile |
| Disable the given interrupt(s) by value. | |
| void | init (unsigned baudRate=DEFAULT_UART_BAUD_RATE) volatile |
| void | disable () volatile |
| Turn off the transceivers. | |
| void | reset () volatile |
| Reset the control register to all zeros. | |
| uint16_t | transmit_fifo_level () volatile |
| uint16_t | receive_fifo_level () volatile |
| bool | can_write () volatile |
| bool | can_read () volatile |
| void | blocking_write (uint8_t byte) volatile |
| Write one byte, blocking until the byte is written. | |
| uint8_t | blocking_read () volatile |
| Read one byte, blocking until a byte is available. | |
Public Attributes | |
| InterruptState | interruptState |
| Interrupts | interruptEnable |
| Interrupts | interruptTest |
| uint32_t | alertTest |
| Alert Test Register (unused). | |
| OpenTitanUart::Control | control |
| OpenTitanUart::Status | status |
| uint32_t | readData |
| UART Read Data. | |
| uint32_t | writeData |
| UART Write Data. | |
| OpenTitanUart::FIFOControl | fifoControl |
| OpenTitanUart::FIFOStatus | fifoStatus |
| uint32_t | override |
| Transmit Pin Override Control. | |
| uint32_t | values |
| UART Oversampled Values. | |
| uint32_t | timeoutControl |
| UART Receive Timeout Control. | |
OpenTitan UART.
This peripheral's source and documentation can be found at: https://github.com/lowRISC/opentitan/tree/ab878b5d3578939a04db72d4ed966a56a869b2ed/hw/ip/uart
Rendered register documentation is served at: https://opentitan.org/book/hw/ip/uart/doc/registers.html
Definition at line 24 of file platform-uart.hh.
|
inline |
Read one byte, blocking until a byte is available.
Definition at line 313 of file platform-uart.hh.
References readData.
|
inline |
Write one byte, blocking until the byte is written.
Definition at line 302 of file platform-uart.hh.
References writeData.
|
inline |
Definition at line 293 of file platform-uart.hh.
|
inline |
Definition at line 287 of file platform-uart.hh.
|
inline |
Turn off the transceivers.
Definition at line 259 of file platform-uart.hh.
References BITPACK_OPERATE_VALUE_DECLTYPE.
|
inline |
Clears the contents of the receive and transmit FIFOs.
Definition at line 183 of file platform-uart.hh.
References BITPACK_OPERATE_VALUE_DECLTYPE.
|
inline |
Definition at line 244 of file platform-uart.hh.
|
inline |
Disable the given interrupt by name.
Definition at line 223 of file platform-uart.hh.
|
inline |
Disable the given interrupt(s) by value.
Definition at line 237 of file platform-uart.hh.
|
inline |
Enable the given interrupt by name.
Definition at line 216 of file platform-uart.hh.
|
inline |
Enable the given interrupt(s) by value.
Definition at line 229 of file platform-uart.hh.
References Bitpack< StorageParam >::raw().
|
inline |
Configure loopback.
When systemLoopback is set, outgoing transmitted bits are routed back the receiving line. When lineLoopback is set, incoming received bits are forwarded to the transmit line.
Definition at line 171 of file platform-uart.hh.
References BITPACK_OPERATE_VALUE_DEPENDENT.
|
inline |
Configure parity.
When enableParity is set, parity will be enabled. When oddParity is set, the odd parity will be used.
Definition at line 158 of file platform-uart.hh.
|
inline |
Definition at line 282 of file platform-uart.hh.
|
inline |
Sets the level receive watermark.
When the number of bytes in the receive FIFO reach this level, the receive watermark interrupt will fire.
Definition at line 209 of file platform-uart.hh.
|
inline |
Reset the control register to all zeros.
That disables the transceivers, clears any loopbacks, disables parity, and so on.
Definition at line 272 of file platform-uart.hh.
|
inline |
Definition at line 277 of file platform-uart.hh.
|
inline |
Sets the level transmit watermark.
When the number of bytes in the transmit FIFO reach this level, the transmit watermark interrupt will fire.
Definition at line 198 of file platform-uart.hh.
| uint32_t OpenTitanUart::alertTest |
Alert Test Register (unused).
Definition at line 61 of file platform-uart.hh.
| Interrupts OpenTitanUart::interruptEnable |
Definition at line 55 of file platform-uart.hh.
| InterruptState OpenTitanUart::interruptState |
Definition at line 54 of file platform-uart.hh.
| Interrupts OpenTitanUart::interruptTest |
Definition at line 56 of file platform-uart.hh.
| uint32_t OpenTitanUart::override |
Transmit Pin Override Control.
Gives direct software control over the transmit pin state.
Definition at line 142 of file platform-uart.hh.
| uint32_t OpenTitanUart::readData |
| uint32_t OpenTitanUart::timeoutControl |
Definition at line 150 of file platform-uart.hh.
| uint32_t OpenTitanUart::values |
UART Oversampled Values.
Definition at line 146 of file platform-uart.hh.
| uint32_t OpenTitanUart::writeData |