| Azure Sphere MT3620 M4 API Reference Manual
    | 
This section introduces the enumerations that SPIM should configure before performing transfer. More...
This section introduces the enumerations that SPIM should configure before performing transfer.
| Enumerations | |
| enum | spi_cpol { SPI_CPOL_0 = 0, SPI_CPOL_1 = 1 } | 
| SPI master's clock polarity definition.  More... | |
| enum | spi_cpha { SPI_CPHA_0 = 0, SPI_CPHA_1 = 1 } | 
| SPI master's clock format definition.  More... | |
| enum | spi_mlsb { SPI_LSB = 0, SPI_MSB = 1 } | 
| SPI master's transaction bit order definition.  More... | |
| enum | spi_slave_sel { SPI_SELECT_DEVICE_0 = 0, SPI_SELECT_DEVICE_1 = 1 } | 
| SPI master's slave device select definition.  More... | |
| enum | spi_cs_polarity { SPI_CS_POLARITY_LOW = 0, SPI_CS_POLARITY_HIGH = 1 } | 
| SPI master's CS polarity definition.  More... | |
| enum spi_cpol | 
SPI master's clock polarity definition.
Before performing transfer, user should make sure the cpol parameter is defined in mtk_spi_config structure and configured through mtk_mhal_spim_prepare_hw().
| Enumerator | |
|---|---|
| SPI_CPOL_0 | Clock polarity is 0. | 
| SPI_CPOL_1 | Clock polarity is 1. | 
| enum spi_cpha | 
SPI master's clock format definition.
Before performing transfer, user should make sure the cpha parameter is defined in mtk_spi_config structure and configured through mtk_mhal_spim_prepare_hw().
| Enumerator | |
|---|---|
| SPI_CPHA_0 | Clock format is 0. | 
| SPI_CPHA_1 | Clock format is 1. | 
| enum spi_mlsb | 
SPI master's transaction bit order definition.
Before performing transfer, user should make sure tx_mlsb and rx_mlsb parameters are defined in mtk_spi_config structure and configured through mtk_mhal_spim_prepare_hw().
| Enumerator | |
|---|---|
| SPI_LSB | Send/Receive data transfer LSB first. | 
| SPI_MSB | Send/Receive data transfer MSB first. | 
| enum spi_slave_sel | 
SPI master's slave device select definition.
Before performing transfer, user should configured through mtk_mhal_spim_prepare_hw().
| Enumerator | |
|---|---|
| SPI_SELECT_DEVICE_0 | select device 0 | 
| SPI_SELECT_DEVICE_1 | select device 1 | 
| enum spi_cs_polarity | 
SPI master's CS polarity definition.
Before performing transfer, user should configured through mtk_mhal_spim_prepare_hw().
| Enumerator | |
|---|---|
| SPI_CS_POLARITY_LOW | cs operate low active | 
| SPI_CS_POLARITY_HIGH | cs operate high active |