![]() |
API Reference
The NEORV32 RISC-V Processor
|
Serial data interface controller (SDI) HW driver header file. More...
Go to the source code of this file.
Data Structures | |
| struct | neorv32_sdi_t |
Functions | |
| static int | neorv32_sdi_rx_empty (void) |
| static int | neorv32_sdi_rx_full (void) |
| static int | neorv32_sdi_rx_overflow (void) |
| static int | neorv32_sdi_tx_empty (void) |
| static int | neorv32_sdi_tx_full (void) |
| static int | neorv32_sdi_tx_underflow (void) |
| static uint8_t | neorv32_sdi_get_nonblocking (void) |
| static void | neorv32_sdi_put_nonblocking (char data) |
Prototypes | |
| int | neorv32_sdi_available (void) |
| void | neorv32_sdi_setup (int rx_enable, int tx_enable, int irq_select) |
| int | neorv32_sdi_fifo_depth (void) |
| void | neorv32_sdi_put (uint8_t data) |
| uint8_t | neorv32_sdi_get (void) |
IO Device: Serial Data Interface (SDI) | |
| #define | NEORV32_SDI ((neorv32_sdi_t*) (NEORV32_SDI_BASE)) |
| enum | NEORV32_SDI_CTRL_enum { SDI_CTRL_RX_EN = 0 , SDI_CTRL_TX_EN = 1 , SDI_CTRL_IRQ_SEL0 = 2 , SDI_CTRL_IRQ_SEL1 = 3 , SDI_CTRL_RX_EMPTY = 16 , SDI_CTRL_RX_HALF = 17 , SDI_CTRL_RX_FULL = 18 , SDI_CTRL_RX_OVER = 19 , SDI_CTRL_TX_EMPTY = 20 , SDI_CTRL_TX_HALF = 21 , SDI_CTRL_TX_FULL = 22 , SDI_CTRL_TX_UNDER = 23 , SDI_CTRL_CS_EN = 27 , SDI_CTRL_FIFO0 = 28 , SDI_CTRL_FIFO3 = 31 } |
| enum | NEORV32_SDI_IRQ_SEL_enum { SDI_IRQ_RX_AVAIL = 0 , SDI_IRQ_RX_HALF = 1 , SDI_IRQ_TX_EMPTY = 2 , SDI_IRQ_TX_NHALF = 3 } |
Serial data interface controller (SDI) HW driver header file.
| #define NEORV32_SDI ((neorv32_sdi_t*) (NEORV32_SDI_BASE)) |
SDI module hardware handle (neorv32_sdi_t)
SDI control register bits
| int neorv32_sdi_available | ( | void | ) |
Check if SDI unit was synthesized.
| int neorv32_sdi_fifo_depth | ( | void | ) |
Get SDI FIFO depth.
| uint8_t neorv32_sdi_get | ( | void | ) |
Get data from SDI input FIFO.
|
inlinestatic |
Get byte from RX FIFO.
| void neorv32_sdi_put | ( | uint8_t | data | ) |
Push data to SDI output FIFO.
| [in] | data | Byte to push into TX FIFO. |
|
inlinestatic |
Put byte to TX FIFO.
|
inlinestatic |
Check if RX FIFO is empty.
|
inlinestatic |
Check if RX FIFO is full.
|
inlinestatic |
Check for RX overflow. Must be executed before reading from RX FIFO.
| void neorv32_sdi_setup | ( | int | rx_enable, |
| int | tx_enable, | ||
| int | irq_select ) |
Reset and configure SDI controller.
| [in] | rx_enable | Enable receiver. |
| [in] | tx_enable | Enable transmitter. |
| [in] | irq_select | Interrupt trigger select (NEORV32_SDI_IRQ_SEL_enum). |
|
inlinestatic |
Check if TX FIFO is empty.
|
inlinestatic |
Check if TX FIFO is full.
|
inlinestatic |
Check for TX underflow. Must be executed before writing to TX FIFO.