20#ifndef MBED_QSPI_API_H
21#define MBED_QSPI_API_H
72 QSPI_CFG_ADDR_SIZE_16,
73 QSPI_CFG_ADDR_SIZE_24,
74 QSPI_CFG_ADDR_SIZE_32,
83#define QSPI_CFG_ALT_SIZE_8 8u
84#define QSPI_CFG_ALT_SIZE_16 16u
85#define QSPI_CFG_ALT_SIZE_24 24u
86#define QSPI_CFG_ALT_SIZE_32 32u
const PinMap * qspi_master_data1_pinmap(void)
Get the pins that support QSPI DATA1.
const PinMap * qspi_master_ssel_pinmap(void)
Get the pins that support QSPI SSEL.
qspi_status_t qspi_free(qspi_t *obj)
Deinitilize QSPI peripheral.
uint8_t qspi_alt_size_t
Alternative size in bits.
qspi_status_t qspi_command_transfer(qspi_t *obj, const qspi_command_t *command, const void *tx_data, size_t tx_size, void *rx_data, size_t rx_size)
Send a command (and optionally data) and get the response.
qspi_status
QSPI return status.
const PinMap * qspi_master_sclk_pinmap(void)
Get the pins that support QSPI SCLK.
struct qspi_s qspi_t
QSPI HAL object.
enum qspi_status qspi_status_t
QSPI return status.
enum qspi_bus_width qspi_bus_width_t
QSPI Bus width.
qspi_address_size
Address size in bits.
qspi_status_t qspi_write(qspi_t *obj, const qspi_command_t *command, const void *data, size_t *length)
Send a command and block of data.
enum qspi_address_size qspi_address_size_t
Address size in bits.
struct qspi_command qspi_command_t
QSPI command.
qspi_bus_width
QSPI Bus width.
qspi_status_t qspi_init_direct(qspi_t *obj, const qspi_pinmap_t *pinmap, uint32_t hz, uint8_t mode)
Initialize QSPI peripheral.
const PinMap * qspi_master_data2_pinmap(void)
Get the pins that support QSPI DATA2.
const PinMap * qspi_master_data0_pinmap(void)
Get the pins that support QSPI DATA0.
const PinMap * qspi_master_data3_pinmap(void)
Get the pins that support QSPI DATA3.
qspi_status_t qspi_init(qspi_t *obj, PinName io0, PinName io1, PinName io2, PinName io3, PinName sclk, PinName ssel, uint32_t hz, uint8_t mode)
Initialize QSPI peripheral.
qspi_status_t qspi_frequency(qspi_t *obj, int hz)
Set the QSPI baud rate.
qspi_status_t qspi_read(qspi_t *obj, const qspi_command_t *command, void *data, size_t *length)
Receive a command and block of data.
@ QSPI_STATUS_ERROR
Generic error >
@ QSPI_STATUS_INVALID_PARAMETER
The parameter is invalid >
@ QSPI_STATUS_OK
Function executed sucessfully >
qspi_alt_size_t size
Alternative size >
uint8_t dummy_count
Dummy cycles count >
bool disabled
Instruction phase skipped if disabled is set to true >
uint8_t value
Instruction value >
qspi_address_size_t size
Address size >
uint32_t value
Address value >
qspi_bus_width_t bus_width
Bus width for the instruction >