![]() |
Kinetis SDK v.2.0 API Reference Manual
Rev. 0
Freescale Semiconductor, Inc.
|
Files | |
| file | fsl_lpi2c_ucosii.h |
Data Structures | |
| struct | lpi2c_rtos_handle_t |
| LPI2C FreeRTOS handle. More... | |
Driver version | |
| #define | FSL_LPI2C_UCOSII_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) |
| LPI2C uCOS II driver version 2.0.0. More... | |
LPI2C RTOS Operation | |
| status_t | LPI2C_RTOS_Init (lpi2c_rtos_handle_t *handle, LPI2C_Type *base, const lpi2c_master_config_t *masterConfig, uint32_t srcClock_Hz) |
| Initializes LPI2C. More... | |
| status_t | LPI2C_RTOS_Deinit (lpi2c_rtos_handle_t *handle) |
| Deinitializes the LPI2C. More... | |
| status_t | LPI2C_RTOS_Transfer (lpi2c_rtos_handle_t *handle, lpi2c_master_transfer_t *transfer) |
| Performs I2C transfer. More... | |
| struct lpi2c_rtos_handle_t |
LPI2C uCOS III handle.
LPI2C uCOS II handle.
Data Fields | |
| LPI2C_Type * | base |
| LPI2C base address. | |
| lpi2c_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. | |
| #define FSL_LPI2C_UCOSII_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) |
| status_t LPI2C_RTOS_Init | ( | lpi2c_rtos_handle_t * | handle, |
| LPI2C_Type * | base, | ||
| const lpi2c_master_config_t * | masterConfig, | ||
| uint32_t | srcClock_Hz | ||
| ) |
This function initializes the LPI2C module and related RTOS context.
| handle | The RTOS LPI2C handle, the pointer to an allocated space for RTOS context. |
| base | The pointer base address of the LPI2C instance to initialize. |
| masterConfig | Configuration structure to set-up LPI2C in master mode. |
| srcClock_Hz | Frequency of input clock of the LPI2C module. |
| status_t LPI2C_RTOS_Deinit | ( | lpi2c_rtos_handle_t * | handle | ) |
This function deinitializes the LPI2C module and related RTOS context.
| handle | The RTOS LPI2C handle. |
| status_t LPI2C_RTOS_Transfer | ( | lpi2c_rtos_handle_t * | handle, |
| lpi2c_master_transfer_t * | transfer | ||
| ) |
This function performs an I2C transfer using LPI2C module according to data given in the transfer structure.
| handle | The RTOS LPI2C handle. |
| transfer | Structure specifying the transfer parameters. |