Kinetis SDK v.1.3 API Reference Manual
Rev. 0
Freescale Semiconductor, Inc.
|
This section describes the programming interface of the FlexIO SPI HAL driver.
Data Structures | |
struct | flexio_spi_dev_t |
Define structure of configuring the flexio spi device. More... | |
struct | flexio_spi_master_config_t |
Define structure of configuring the flexio spi bus when master. More... | |
struct | flexio_spi_slave_config_t |
Define structure of configuring the flexio spi bus when slave. More... | |
Functions | |
flexio_status_t | FLEXIO_SPI_HAL_ConfigMaster (flexio_spi_dev_t *devPtr, const flexio_spi_master_config_t *configPtr) |
Configure the flexio working as spi master. More... | |
flexio_status_t | FLEXIO_SPI_HAL_ConfigSlave (flexio_spi_dev_t *devPtr, const flexio_spi_slave_config_t *configPtr) |
Configure the flexio working as spi slave. More... | |
bool | FLEXIO_SPI_HAL_GetTxBufferEmptyFlag (flexio_spi_dev_t *devPtr) |
Get the flag if the tx buffer is empty. More... | |
void | FLEXIO_SPI_HAL_ClearTxBufferEmptyFlag (flexio_spi_dev_t *devPtr) |
Clear the flag that tx buffer is empty. More... | |
void | FLEXIO_SPI_HAL_SetTxBufferEmptyIntCmd (flexio_spi_dev_t *devPtr, bool enable) |
Switch on/off the interrupt for event of tx buffer empty. More... | |
bool | FLEXIO_SPI_HAL_GetTxErrFlag (flexio_spi_dev_t *devPtr) |
Get the flag of tx error. More... | |
void | FLEXIO_SPI_HAL_ClearTxErrFlag (flexio_spi_dev_t *devPtr) |
Clear the flag of tx error manually. More... | |
void | FLEXIO_SPI_HAL_SetTxErrIntCmd (flexio_spi_dev_t *devPtr, bool enable) |
Switch on/off the interrupt for tx error event. More... | |
void | FLEXIO_SPI_HAL_PutDataMSB (flexio_spi_dev_t *devPtr, uint32_t dat) |
Put the data to tx buffer as MSB transfer. More... | |
void | FLEXIO_SPI_HAL_PutDataMSBPolling (flexio_spi_dev_t *devPtr, uint32_t dat) |
Put the data to tx buffer as MSB transfer when empty. More... | |
void | FLEXIO_SPI_HAL_PutDataLSB (flexio_spi_dev_t *devPtr, uint32_t dat) |
Put the data to tx buffer as LSB transfer. More... | |
void | FLEXIO_SPI_HAL_PutDataLSBPolling (flexio_spi_dev_t *devPtr, uint32_t dat) |
Put the data to tx buffer as LSB transfer when empty. More... | |
void | FLEXIO_SPI_HAL_SetTxDmaCmd (flexio_spi_dev_t *devPtr, bool enable) |
Switch on/off the DMA support for tx event. More... | |
uint32_t | FLEXIO_SPI_HAL_GetTxBufferMSBAddr (flexio_spi_dev_t *devPtr) |
Get the tx MSB buffer's register for DMA use. More... | |
uint32_t | FLEXIO_SPI_HAL_GetTxBufferLSBAddr (flexio_spi_dev_t *devPtr) |
Get the tx LSB buffer's register for DMA use. More... | |
bool | FLEXIO_SPI_HAL_GetRxBufferFullFlag (flexio_spi_dev_t *devPtr) |
Get the flag if the rx buffer is full. More... | |
void | FLEXIO_SPI_HAL_ClearRxBufferFullFlag (flexio_spi_dev_t *devPtr) |
Clear the flag of rx buffer full manually. More... | |
void | FLEXIO_SPI_HAL_SetRxBufferFullIntCmd (flexio_spi_dev_t *devPtr, bool enable) |
Switch on/off the interrupt of rx buffer full event. More... | |
bool | FLEXIO_SPI_HAL_GetRxErrFlag (flexio_spi_dev_t *devPtr) |
Get the flag of rx error. More... | |
void | FLEXIO_SPI_HAL_ClearRxErrFlag (flexio_spi_dev_t *devPtr) |
Clear the flag of rx error manually. More... | |
void | FLEXIO_SPI_HAL_SetRxErrIntCmd (flexio_spi_dev_t *devPtr, bool enable) |
Switch on/off the interrupt of the rx error event. More... | |
uint32_t | FLEXIO_SPI_HAL_GetDataMSB (flexio_spi_dev_t *devPtr) |
Get the data from rx MSB buffer. More... | |
uint32_t | FLEXIO_SPI_HAL_GetDataMSBPolling (flexio_spi_dev_t *devPtr) |
Get the data from rx MSB buffer when full. More... | |
uint32_t | FLEXIO_SPI_HAL_GetDataLSB (flexio_spi_dev_t *devPtr) |
Get the data from rx LSB buffer. More... | |
uint32_t | FLEXIO_SPI_HAL_GetDataLSBPolling (flexio_spi_dev_t *devPtr) |
Get the data from rx LSB buffer when full. More... | |
void | FLEXIO_SPI_HAL_SetRxDmaCmd (flexio_spi_dev_t *devPtr, bool enable) |
Swtich on/off the DMA for rx event. More... | |
uint32_t | FLEXIO_SPI_HAL_GetRxBufferMSBAddr (flexio_spi_dev_t *devPtr) |
Get the address of rx MSB buffer. More... | |
uint32_t | FLEXIO_SPI_HAL_GetRxBufferLSBAddr (flexio_spi_dev_t *devPtr) |
Get the address of rx LSB buffer. More... | |
struct flexio_spi_dev_t |
Data Fields | |
FLEXIO_Type * | flexioBase |
FlexIO module base address. More... | |
uint32_t | txPinIdx |
Output pin index. More... | |
uint32_t | rxPinIdx |
Input pin index. More... | |
uint32_t | sclkPinIdx |
Clock line, output for master, input for slave. More... | |
uint32_t | csnPinIdx |
Chip select line, output for master, input for slave. More... | |
uint32_t | shifterIdx [2] |
Shifter index. More... | |
uint32_t | timerIdx [2] |
Timer index. More... | |
FLEXIO_Type* flexio_spi_dev_t::flexioBase |
uint32_t flexio_spi_dev_t::txPinIdx |
uint32_t flexio_spi_dev_t::rxPinIdx |
uint32_t flexio_spi_dev_t::sclkPinIdx |
uint32_t flexio_spi_dev_t::csnPinIdx |
uint32_t flexio_spi_dev_t::shifterIdx[2] |
uint32_t flexio_spi_dev_t::timerIdx[2] |
timer 0 is available for both master and slave. timer 1 would be only available for master and not used in slave mode.
struct flexio_spi_master_config_t |
Data Fields | |
uint32_t | flexioBusClk |
Clock frequency of flexio bus. More... | |
uint32_t | baudrate |
Baudrate for spi bus. More... | |
uint32_t | bitCount |
Bit count for each word. More... | |
bool | cphaOneEnable |
The phase of spi. More... | |
uint32_t flexio_spi_master_config_t::flexioBusClk |
uint32_t flexio_spi_master_config_t::baudrate |
uint32_t flexio_spi_master_config_t::bitCount |
bool flexio_spi_master_config_t::cphaOneEnable |
struct flexio_spi_slave_config_t |
Data Fields | |
uint32_t | bitCount |
Bit count for each word. More... | |
bool | cphaOneEnable |
The phase of spi. More... | |
uint32_t flexio_spi_slave_config_t::bitCount |
bool flexio_spi_slave_config_t::cphaOneEnable |
flexio_status_t FLEXIO_SPI_HAL_ConfigMaster | ( | flexio_spi_dev_t * | devPtr, |
const flexio_spi_master_config_t * | configPtr | ||
) |
devPtr | Pointer to the device. |
configPtr | Pointer to the configuration structure. |
flexio_status_t FLEXIO_SPI_HAL_ConfigSlave | ( | flexio_spi_dev_t * | devPtr, |
const flexio_spi_slave_config_t * | configPtr | ||
) |
devPtr | Pointer to the device. |
configPtr | Pointer to the configuration structure. |
bool FLEXIO_SPI_HAL_GetTxBufferEmptyFlag | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_ClearTxBufferEmptyFlag | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_SetTxBufferEmptyIntCmd | ( | flexio_spi_dev_t * | devPtr, |
bool | enable | ||
) |
devPtr | Pointer to the device. |
enable | Switcher to the event. |
bool FLEXIO_SPI_HAL_GetTxErrFlag | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_ClearTxErrFlag | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_SetTxErrIntCmd | ( | flexio_spi_dev_t * | devPtr, |
bool | enable | ||
) |
devPtr | Pointer to the device. |
enable | Switcher to the event. |
void FLEXIO_SPI_HAL_PutDataMSB | ( | flexio_spi_dev_t * | devPtr, |
uint32_t | dat | ||
) |
devPtr | Pointer to the device. |
dat | Sending data. |
void FLEXIO_SPI_HAL_PutDataMSBPolling | ( | flexio_spi_dev_t * | devPtr, |
uint32_t | dat | ||
) |
devPtr | Pointer to the device. |
dat | Sending data. |
void FLEXIO_SPI_HAL_PutDataLSB | ( | flexio_spi_dev_t * | devPtr, |
uint32_t | dat | ||
) |
devPtr | Pointer to the device. |
dat | Sending data. |
void FLEXIO_SPI_HAL_PutDataLSBPolling | ( | flexio_spi_dev_t * | devPtr, |
uint32_t | dat | ||
) |
devPtr | Pointer to the device. |
dat | Sending data. |
void FLEXIO_SPI_HAL_SetTxDmaCmd | ( | flexio_spi_dev_t * | devPtr, |
bool | enable | ||
) |
devPtr | Pointer to the device. |
enable | Switcher to the event. |
uint32_t FLEXIO_SPI_HAL_GetTxBufferMSBAddr | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
uint32_t FLEXIO_SPI_HAL_GetTxBufferLSBAddr | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
bool FLEXIO_SPI_HAL_GetRxBufferFullFlag | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_ClearRxBufferFullFlag | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_SetRxBufferFullIntCmd | ( | flexio_spi_dev_t * | devPtr, |
bool | enable | ||
) |
devPtr | Pointer to the device. |
enable | Switcher to the event. |
bool FLEXIO_SPI_HAL_GetRxErrFlag | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_ClearRxErrFlag | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_SetRxErrIntCmd | ( | flexio_spi_dev_t * | devPtr, |
bool | enable | ||
) |
devPtr | Pointer to the device. |
enable | Switcher to the event. |
uint32_t FLEXIO_SPI_HAL_GetDataMSB | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
uint32_t FLEXIO_SPI_HAL_GetDataMSBPolling | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
uint32_t FLEXIO_SPI_HAL_GetDataLSB | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
uint32_t FLEXIO_SPI_HAL_GetDataLSBPolling | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
void FLEXIO_SPI_HAL_SetRxDmaCmd | ( | flexio_spi_dev_t * | devPtr, |
bool | enable | ||
) |
devPtr | Pointer to the device. |
enable | Switcher to the event. |
uint32_t FLEXIO_SPI_HAL_GetRxBufferMSBAddr | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |
uint32_t FLEXIO_SPI_HAL_GetRxBufferLSBAddr | ( | flexio_spi_dev_t * | devPtr | ) |
devPtr | Pointer to the device. |