MCUXpresso SDK API Reference Manual: I2C FreeRTOS Driver

| MCUXpresso SDK API Reference Manual Rev 2.11.1 NXP Semiconductors

- Main Page
- Related Pages
- API Reference

All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
I2C FreeRTOS Driver
I2C: Inter-Integrated Circuit Driver

## Overview

## Driver version
#define | FSL_I2C_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 0, 7))
| I2C FreeRTOS driver version. 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 the I2C transfer. More...

## Macro Definition Documentation

#define FSL_I2C_FREERTOS_DRIVER_VERSION (MAKE_VERSION(2, 0, 7))

## 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 the related RTOS context.

Parameters

  handle | The RTOS I2C handle, the pointer to an allocated space for RTOS context.
  base | The pointer base address of the I2C instance to initialize.
  masterConfig | The configuration structure to set-up I2C in master mode.
  srcClock_Hz | The frequency of an 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 the related RTOS context.

Parameters

  handle | The RTOS I2C handle.

status_t I2C_RTOS_Transfer | ( | i2c_rtos_handle_t * | handle,
|  | i2c_master_transfer_t * | transfer
| ) |  |

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

Parameters

  handle | The RTOS I2C handle.
  transfer | A structure specifying the transfer parameters.

Returns
  status of the operation.