Azure Sphere MT3620 M4 API Reference Manual
|
This section introduces the enumerations that should be configured before performing transfer. More...
This section introduces the enumerations that should be configured before performing transfer.
Enumerations | |
enum | spis_cpol { SPIS_CPOL_0 = 0, SPIS_CPOL_1 = 1 } |
SPI slave's clock polarity definition. More... | |
enum | spis_cpha { SPIS_CPHA_0 = 0, SPIS_CPHA_1 = 1 } |
SPI slave's clock format definition. More... | |
enum | spis_opcode { OPCODE_SPIM_WRITE_SPIS_RX = 0x1, OPCODE_SPIM_READ_SPIS_TX = 0x2, OPCODE_SPIM_GET_SPIS_STATUS = 0x3, OPCODE_SPIM_SET_SPIS_IRQ = 0x8, OPCODE_SPIM_CLEAR_SPIS_D2HMB = 0x9, OPCODE_SPIM_SEND_SPIS_H2DMB = 0xa } |
SPI slave's supported opcode. More... | |
enum | spis_tx_rx_flag { SPIM_READ_DATA_FROM_SPIS = 0x0, SPIM_WRITE_DATA_TO_SPIS = 0x1, SPIM_READ_STATUS_FROM_SPIS = 0x2, SPIM_WRITE_IRQ_MB_TO_SPIS = 0x3 } |
SPI slave's transmisson type. More... | |
enum | spis_d2hmb_state { SPIS_IDLE = 0x0, SPIS_READY = 0x1, SPIS_DONE = 0x2, SPIS_ERR = 0x4 } |
SPI slave's supported transaction status. More... | |
enum | spis_direction_cmd { SPIM_READ_DATA = 0, SPIM_WRITE_DATA = 1 } |
SPI transmission direction cmd definition. More... | |
enum spis_cpol |
SPI slave's clock polarity definition.
Before performing transfer, users should make sure that the cpol parameter is defined in mtk_spis_config structure and is configured through mtk_mhal_spis_setup_hw().
Enumerator | |
---|---|
SPIS_CPOL_0 |
Clock polarity is 0. |
SPIS_CPOL_1 |
Clock polarity is 1. |
enum spis_cpha |
SPI slave's clock format definition.
Before performing transfer, users should make sure that the cpha parameter is defined in mtk_spis_config structure and is configured through mtk_mhal_spis_setup_hw().
Enumerator | |
---|---|
SPIS_CPHA_0 |
Clock format is 0. |
SPIS_CPHA_1 |
Clock format is 1. |
enum spis_opcode |
SPI slave's supported opcode.
Before performing transfer, spi master should send different OPCODE to let spi slave controller know the current transaction type.
enum spis_tx_rx_flag |
SPI slave's transmisson type.
spis_tx_rx_flag corresponds to SPIS_STATUS Bit[5:4], Which is used to determine the type of current transmission in the irq handler function.
enum spis_d2hmb_state |
SPI slave's supported transaction status.
This status will be updated to register SPIS_STATUS(0x60) by writing register SPIS_D2HMB(0x68). spi master checks spi slave transaction status via this status.
Enumerator | |
---|---|
SPIS_IDLE |
spis idle |
SPIS_READY |
spis preparation transfer ready |
SPIS_DONE |
spis transfer done |
SPIS_ERR |
spis transfer error |
enum spis_direction_cmd |