RV32 SoC DS UG
High-Perf RV32 SoC DS UG
RV64 SoC DS UG API and Examples
Embedded IDE UG
Loading...
Searching...
No Matches

Overview

Structs used by the driver.

Note
This is an example show how to instantiate SPI with spi_instance_t and spi_hwreg_t.
#define SPI (spi_hwreg_t*)SYSTEM_SPI_0_IO_CTRL
spi_instance_t SPI_inst = {
.hwreg = SPI,
.cpol = LOW,
.clkDivider = 2,
.ssSetup = 5,
.ssHold = 2,
.ssDisable = 7
},
spi_applyConfig(&SPI_inst);
@ FULL_DUPLEX_SINGLE_LINE
Full-duplex mode using single data lin.
Definition spi.h:142
@ LOW
Clock is low when id.
Definition spi.h:149
@ DATA_SAMPLED_RISE_EDGE
Data sampled on rising clock ed.
Definition spi.h:155
void spi_applyConfig(spi_instance_t *inst)
Applies the current configuration settings stored in the spi_instance_t structure to the SPI hardware...
Definition spi.c:93
SPI instance. Holds the software registers and hardware pointer.
Definition spi.h:236

Data Structures

struct  spi_hwreg_t
 SPI hardware register map. More...
struct  spi_instance_t
 SPI instance. Holds the software registers and hardware pointer. More...