OSPI
The OSPI driver is contained within its header ospi.h and its source ospi.c in
Src. The driver allows for new code to easily read and write to an OSPI interface
on the board. Note that the driver is used for Quad-SPI over the OSPI peripheral.
Types
-
enum OSpiPeriph
The OSPI interface to use. Only one OSPI peripheral can be used at one time, and only one device should use the bus.
-
enum OSpiSpeed
The desired speed of the OSPI interface in Hz. The possible options are:
-
OSPI_SPEED_INVALID
-
OSPI_SPEED_1MHz
-
OSPI_SPEED_5MHz
-
OSPI_SPEED_10MHz
-
OSPI_SPEED_20MHz
-
OSPI_SPEED_40MHz
-
OSPI_SPEED_80MHz
-
OSPI_SPEED_INVALID
-
struct OSpiDevice
Configuration for communicating with a specific device on the bus.
-
OSpiPeriph periph
Peripheral which the device is connected to.
-
uint8_t sck
Pin number for the SCK wire (PIN_PXX).
-
uint8_t ncs
Pin number for the CS wire (PIN_PXX).
-
uint8_t io0
Pin number for the MOSI wire (PIN_PXX).
-
uint8_t io1
Pin number for the MISO wire (PIN_PXX).
-
uint8_t io2
Pin number for the IO2 wire (PIN_PXX).
-
uint8_t io3
Pin number for the IO3 wire (PIN_PXX).
-
uint8_t device_size
Describes the size of the device in bytes following the formula
2^(device_size+1).
-
OSpiPeriph periph