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_i2c_ucosii.h
 
file  fsl_i2c_ucosiii.h
 

Data Structures

struct  i2c_rtos_handle_t
 I2C FreeRTOS handle. More...
 

Driver version

#define FSL_I2C_UCOSII_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 I2C uCOS II driver version 2.0.0. More...
 

I2C RTOS Operation

status_t I2C_RTOS_Init (i2c_rtos_handle_t *handle, I2C_Type *base, const i2c_master_config_t *masterConfig, uint32_t srcClock_Hz)
 Initializes I2C. More...
 
status_t I2C_RTOS_Deinit (i2c_rtos_handle_t *handle)
 Deinitializes the I2C. More...
 
status_t I2C_RTOS_Transfer (i2c_rtos_handle_t *handle, i2c_master_transfer_t *transfer)
 Performs I2C transfer. More...
 

Driver version

#define FSL_I2C_UCOSIII_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
 I2C uCOS III driver version 2.0.0. More...
 

Data Structure Documentation

struct i2c_rtos_handle_t

Data Fields

I2C_Type * base
 I2C base address.
 
i2c_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 trasfer.
 
SemaphoreHandle_t sem
 Semaphore to notify and unblock task when transfer ends.
 
OS_EVENT * mutex
 Mutex to lock the handle during a trasfer.
 
OS_FLAG_GRP * event
 Semaphore to notify and unblock task when transfer ends.
 
OS_SEM mutex
 Mutex to lock the handle during a trasfer.
 
OS_FLAG_GRP event
 Semaphore to notify and unblock task when transfer ends.
 

Macro Definition Documentation

#define FSL_I2C_UCOSII_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))
#define FSL_I2C_UCOSIII_DRIVER_VERSION   (MAKE_VERSION(2, 0, 0))

Function Documentation

status_t I2C_RTOS_Init ( i2c_rtos_handle_t handle,
I2C_Type *  base,
const i2c_master_config_t masterConfig,
uint32_t  srcClock_Hz 
)

This function initializes the I2C module and related RTOS context.

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

This function deinitializes the I2C module and related RTOS context.

Parameters
handleThe RTOS I2C handle.
status_t I2C_RTOS_Transfer ( i2c_rtos_handle_t handle,
i2c_master_transfer_t transfer 
)

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

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