Sapphire SoC DS Sapphire SoC UG Sapphire HP SoC DS Sapphire HP SoC UG RISC-V Embedded IDE UG Board Support Package
Loading...
Searching...
No Matches

Overview

Structs used by the driver.

Note
This is 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:118
@ LOW
Clock is low when id.
Definition spi.h:125
@ DATA_SAMPLED_RISE_EDGE
Data sampled on rising clock ed.
Definition spi.h:131
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:212

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...