SPI memory controller driver for the nRF5 QSPI peripheral.
More...
SPI memory controller driver for the nRF5 QSPI peripheral.
Runs operations with up to 8 bytes after a single line opcode as custom instructions, and reads, programs and erases with the opcodes the peripheral issues itself. Its read window is the READ task, covering the whole memory. The QSPI interrupt is connected by the board:
#define NRF5_GPIO_P0
Port P0.
Definition nrf5.h:40
#define PBL_GPIO(_port, _pin, _flags)
Initializer for a struct pbl_gpio.
Definition gpio.h:148
void pbl_spi_mem_nrf5_qspi_irq_handler(const struct pbl_spi_mem_nrf5_qspi *qspi)
QSPI interrupt handler, to connect with PBL_IRQ_CONNECT().
#define PBL_SPI_MEM_NRF5_QSPI_DEFINE(sym, _name, _freq_hz, _sck, _csn, _io0, _io1, _io2, _io3)
Define the nRF5 QSPI controller.
Definition nrf5_qspi.h:76
#define PBL_IRQ_CONNECT(line, prio, isr, arg, flags)
Bind a SoC interrupt line to a handler at build time.
Definition irq.h:117
◆ pbl_spi_mem_nrf5_qspi
| struct pbl_spi_mem_nrf5_qspi |
| Data Fields |
|
struct pbl_gpio |
csn |
CSN pin. |
|
struct pbl_spi_mem_nrf5_qspi_data * |
data |
Driver state. |
|
uint32_t |
freq_hz |
Clock frequency, in Hz. |
|
struct pbl_gpio |
io[4] |
IO0 to IO3 pins. |
|
struct pbl_spi_mem |
mem |
Controller. |
|
struct pbl_gpio |
sck |
SCK pin. |
◆ PBL_SPI_MEM_NRF5_QSPI_DEFINE
| #define PBL_SPI_MEM_NRF5_QSPI_DEFINE |
( |
|
sym, |
|
|
|
_name, |
|
|
|
_freq_hz, |
|
|
|
_sck, |
|
|
|
_csn, |
|
|
|
_io0, |
|
|
|
_io1, |
|
|
|
_io2, |
|
|
|
_io3 |
|
) |
| |
Value:
.data = &sym##_data, \
.
io = {_io0, _io1, _io2, _io3}, \
}; \
PBL_DEVICE_REGISTER(sym, &sym.
mem.
dev)
struct pbl_gpio sck
SCK pin.
Definition nrf5_qspi.h:52
struct pbl_spi_mem mem
Controller.
Definition nrf5_qspi.h:46
uint32_t freq_hz
Clock frequency, in Hz.
Definition nrf5_qspi.h:50
struct pbl_gpio io[4]
IO0 to IO3 pins.
Definition nrf5_qspi.h:56
struct pbl_gpio csn
CSN pin.
Definition nrf5_qspi.h:54
nRF5 QSPI controller.
Definition nrf5_qspi.h:44
struct pbl_device dev
Device.
Definition spi_mem.h:233
#define PBL_SPI_MEM_STATE_DEFINE(sym)
Define the class state of controller sym, for the PBL_SPI_MEM_*_DEFINE() macro of a driver.
Definition spi_mem.h:248
#define PBL_SPI_MEM_INIT(sym, _name, _deps, _ops, _flags)
Initializer for the struct pbl_spi_mem of controller sym.
Definition spi_mem.h:262
#define PBL_SEM_INITIALIZER(init, lim)
Static initializer for a semaphore.
Definition sem.h:54
Define the nRF5 QSPI controller.
- Parameters
-
◆ pbl_spi_mem_nrf5_qspi_irq_handler()