29typedef volatile struct __attribute__((packed,aligned(4))) {
35#define NEORV32_SPI ((neorv32_spi_t*) (NEORV32_SPI_BASE))
83void neorv32_spi_setup(
int prsc,
int cdiv,
int clk_phase,
int clk_polarity, uint32_t irq_mask);
uint32_t neorv32_spi_get_clock_speed(void)
Definition neorv32_spi.c:85
int neorv32_spi_busy(void)
Definition neorv32_spi.c:247
void neorv32_spi_highspeed_disable(void)
Definition neorv32_spi.c:74
int neorv32_spi_available(void)
Definition neorv32_spi.c:26
void neorv32_spi_cs_en(int cs)
Definition neorv32_spi.c:144
uint8_t neorv32_spi_trans(uint8_t tx_data)
Definition neorv32_spi.c:172
void neorv32_spi_setup(int prsc, int cdiv, int clk_phase, int clk_polarity, uint32_t irq_mask)
Definition neorv32_spi.c:46
void neorv32_spi_disable(void)
Definition neorv32_spi.c:109
int neorv32_spi_check_cs(void)
Definition neorv32_spi.c:231
void neorv32_spi_enable(void)
Definition neorv32_spi.c:118
void neorv32_spi_cs_en_nonblocking(int cs)
Definition neorv32_spi.c:209
void neorv32_spi_cs_dis(void)
Definition neorv32_spi.c:157
NEORV32_SPI_DATA_enum
Definition neorv32_spi.h:69
@ SPI_DATA_MSB
Definition neorv32_spi.h:71
@ SPI_DATA_CSEN
Definition neorv32_spi.h:72
@ SPI_DATA_CMD
Definition neorv32_spi.h:73
@ SPI_DATA_LSB
Definition neorv32_spi.h:70
uint8_t neorv32_spi_get_nonblocking(void)
Definition neorv32_spi.c:196
void neorv32_spi_highspeed_enable(void)
Definition neorv32_spi.c:65
void neorv32_spi_cs_dis_nonblocking(void)
Definition neorv32_spi.c:220
int neorv32_spi_get_fifo_depth(void)
Definition neorv32_spi.c:129
NEORV32_SPI_CTRL_enum
Definition neorv32_spi.h:38
@ SPI_CTRL_CDIV1
Definition neorv32_spi.h:46
@ SPI_CTRL_RX_AVAIL
Definition neorv32_spi.h:51
@ SPI_CTRL_FIFO_LSB
Definition neorv32_spi.h:61
@ SPI_CTRL_IRQ_RX_AVAIL
Definition neorv32_spi.h:56
@ SPI_CTRL_IRQ_IDLE
Definition neorv32_spi.h:59
@ SPI_CTRL_TX_EMPTY
Definition neorv32_spi.h:52
@ SPI_CTRL_PRSC1
Definition neorv32_spi.h:43
@ SPI_CTRL_CPHA
Definition neorv32_spi.h:40
@ SPI_CS_ACTIVE
Definition neorv32_spi.h:64
@ SPI_CTRL_TX_NHALF
Definition neorv32_spi.h:53
@ SPI_CTRL_EN
Definition neorv32_spi.h:39
@ SPI_CTRL_CPOL
Definition neorv32_spi.h:41
@ SPI_CTRL_BUSY
Definition neorv32_spi.h:65
@ SPI_CTRL_PRSC2
Definition neorv32_spi.h:44
@ SPI_CTRL_CDIV3
Definition neorv32_spi.h:48
@ SPI_CTRL_FIFO_MSB
Definition neorv32_spi.h:62
@ SPI_CTRL_IRQ_TX_HALF
Definition neorv32_spi.h:58
@ SPI_CTRL_TX_FULL
Definition neorv32_spi.h:54
@ SPI_CTRL_CDIV2
Definition neorv32_spi.h:47
@ SPI_CTRL_PRSC0
Definition neorv32_spi.h:42
@ SPI_CTRL_HIGHSPEED
Definition neorv32_spi.h:49
@ SPI_CTRL_CDIV0
Definition neorv32_spi.h:45
@ SPI_CTRL_IRQ_TX_EMPTY
Definition neorv32_spi.h:57
void neorv32_spi_put_nonblocking(uint8_t tx_data)
Definition neorv32_spi.c:185
Definition neorv32_spi.h:29
uint32_t CTRL
Definition neorv32_spi.h:30
uint32_t DATA
Definition neorv32_spi.h:31