MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

This section describes the programming interface of the SPI FreeRTOS driver.

SPI RTOS Operation

status_t SPI_RTOS_Init (spi_rtos_handle_t *handle, SPI_Type *base, const spi_master_config_t *masterConfig, uint32_t srcClock_Hz)
 Initializes SPI. More...
 
status_t SPI_RTOS_Deinit (spi_rtos_handle_t *handle)
 Deinitializes the SPI. More...
 
status_t SPI_RTOS_Transfer (spi_rtos_handle_t *handle, spi_transfer_t *transfer)
 Performs SPI transfer. More...
 

Function Documentation

status_t SPI_RTOS_Init ( spi_rtos_handle_t *  handle,
SPI_Type *  base,
const spi_master_config_t masterConfig,
uint32_t  srcClock_Hz 
)

This function initializes the SPI module and related RTOS context.

Parameters
handleThe RTOS SPI handle, the pointer to an allocated space for RTOS context.
baseThe pointer base address of the SPI instance to initialize.
masterConfigConfiguration structure to set-up SPI in master mode.
srcClock_HzFrequency of input clock of the SPI module.
Returns
status of the operation.
status_t SPI_RTOS_Deinit ( spi_rtos_handle_t *  handle)

This function deinitializes the SPI module and related RTOS context.

Parameters
handleThe RTOS SPI handle.
status_t SPI_RTOS_Transfer ( spi_rtos_handle_t *  handle,
spi_transfer_t transfer 
)

This function performs an SPI transfer according to data given in the transfer structure.

Parameters
handleThe RTOS SPI handle.
transferStructure specifying the transfer parameters.
Returns
status of the operation.