![]() |
NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Serial data interface controller (SPPI) HW driver header file. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | neorv32_sdi_t |
Functions | |
Prototypes | |
int | neorv32_sdi_available (void) |
void | neorv32_sdi_setup (uint32_t irq_mask) |
void | neorv32_sdi_disable (void) |
void | neorv32_sdi_enable (void) |
int | neorv32_sdi_get_fifo_depth (void) |
void | neorv32_sdi_put (uint8_t data) |
uint8_t | neorv32_sdi_get (void) |
void | neorv32_sdi_put_nonblocking (uint8_t data) |
uint8_t | neorv32_sdi_get_nonblocking (void) |
int | neorv32_sdi_rx_empty (void) |
int | neorv32_sdi_rx_full (void) |
int | neorv32_sdi_tx_empty (void) |
int | neorv32_sdi_tx_full (void) |
void | neorv32_sdi_rx_clear (void) |
void | neorv32_sdi_tx_clear (void) |
int | neorv32_sdi_check_cs (void) |
IO Device: Serial Data Interface (SDI) | |
#define | NEORV32_SDI ((neorv32_sdi_t*) (NEORV32_SDI_BASE)) |
enum | NEORV32_SDI_CTRL_enum { SDI_CTRL_EN = 0 , SDI_CTRL_CLR_RX = 1 , SDI_CTRL_CLR_TX = 2 , SDI_CTRL_FIFO_LSB = 4 , SDI_CTRL_FIFO_MSB = 7 , SDI_CTRL_IRQ_RX_NEMPTY = 16 , SDI_CTRL_IRQ_RX_FULL = 17 , SDI_CTRL_IRQ_TX_EMPTY = 18 , SDI_CTRL_RX_EMPTY = 24 , SDI_CTRL_RX_FULL = 25 , SDI_CTRL_TX_EMPTY = 26 , SDI_CTRL_TX_FULL = 27 , SDI_CTRL_CS_ACTIVE = 31 } |
Serial data interface controller (SPPI) 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_check_cs | ( | void | ) |
Get status of chip-select line.
void neorv32_sdi_disable | ( | void | ) |
Disable SDI controller.
void neorv32_sdi_enable | ( | void | ) |
Enable SDI controller.
uint8_t neorv32_sdi_get | ( | void | ) |
Get data from SDI input FIFO (blocking).
int neorv32_sdi_get_fifo_depth | ( | void | ) |
Get SDI FIFO depth.
uint8_t neorv32_sdi_get_nonblocking | ( | void | ) |
Get data from SDI input FIFO (non-blocking).
void neorv32_sdi_put | ( | uint8_t | data | ) |
Push data to SDI output FIFO (blocking).
[in] | data | Byte to push into TX FIFO. |
void neorv32_sdi_put_nonblocking | ( | uint8_t | data | ) |
Push data to SDI output FIFO (non-blocking).
[in] | data | Byte to push into TX FIFO. |
void neorv32_sdi_rx_clear | ( | void | ) |
Clear RX FIFO.
int neorv32_sdi_rx_empty | ( | void | ) |
Check if RX FIFO is empty.
int neorv32_sdi_rx_full | ( | void | ) |
Check if RX FIFO is full.
void neorv32_sdi_setup | ( | uint32_t | irq_mask | ) |
Reset, enable and configure SDI controller. The SDI control register bits are listed in NEORV32_SDI_CTRL_enum.
[in] | irq_mask | Interrupt configuration bit mask (CTRL's irq_* bits). |
void neorv32_sdi_tx_clear | ( | void | ) |
Clear TX FIFO.
int neorv32_sdi_tx_empty | ( | void | ) |
Check if TX FIFO is empty.
int neorv32_sdi_tx_full | ( | void | ) |
Check if TX FIFO is full.