Kinetis SDK v.2.0 API Reference Manual  Rev. 0
Freescale Semiconductor, Inc.
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

Files

file  fsl_dspi_freertos.h
 

Data Structures

struct  dspi_rtos_handle_t
 DSPI FreeRTOS handle. More...
 

Driver version

#define FSL_DSPI_FREERTOS_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 DSPI FreeRTOS driver version 2.0.0. More...
 

DSPI RTOS Operation

status_t DSPI_RTOS_Init (dspi_rtos_handle_t *handle, SPI_Type *base, const dspi_master_config_t *masterConfig, uint32_t srcClock_Hz)
 Initializes DSPI. More...
 
status_t DSPI_RTOS_Deinit (dspi_rtos_handle_t *handle)
 Deinitializes the DSPI. More...
 
status_t DSPI_RTOS_Transfer (dspi_rtos_handle_t *handle, dspi_transfer_t *transfer)
 Performs SPI transfer. More...
 

Data Structure Documentation

struct dspi_rtos_handle_t

DSPI µC/OS-III handle.

DSPI µC/OS-II handle.

Data Fields

SPI_Type * base
 DSPI base address.
 
dspi_master_handle_t drv_handle
 Handle of the underlying driver, treated as opaque by the RTOS layer.
 
SemaphoreHandle_t mutex
 Mutex to lock the handle during a transfer.
 
SemaphoreHandle_t event
 Semaphore to notify and unblock task when transfer ends.
 
OS_EVENT * mutex
 Mutex to lock the handle during a transfer.
 
OS_FLAG_GRP * event
 Semaphore to notify and unblock task when transfer ends.
 
OS_SEM mutex
 Mutex to lock the handle during a transfer.
 
OS_FLAG_GRP event
 Semaphore to notify and unblock task when transfer ends.
 

Macro Definition Documentation

#define FSL_DSPI_FREERTOS_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))

Function Documentation

status_t DSPI_RTOS_Init ( dspi_rtos_handle_t handle,
SPI_Type *  base,
const dspi_master_config_t masterConfig,
uint32_t  srcClock_Hz 
)

This function initializes the DSPI module and related RTOS context.

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

This function deinitializes the DSPI module and related RTOS context.

Parameters
handleThe RTOS DSPI handle.
status_t DSPI_RTOS_Transfer ( dspi_rtos_handle_t handle,
dspi_transfer_t transfer 
)

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

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