![]() |
MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The MCUXpresso SDK provides a peripheral driver for the Inter-Integrated Circuit (I2C) DMAC module of MCUXpresso SDK devices.
Data Structures | |
struct | i2c_master_dmac_handle_t |
I2C master DMAC transfer structure. More... | |
Macros | |
#define | I2C_TX_LENGTH 8U |
Retry times for waiting flag. More... | |
Typedefs | |
typedef void(* | i2c_master_dmac_transfer_callback_t )(I2C_Type *base, i2c_master_dmac_handle_t *handle, status_t status, void *userData) |
I2C master DMAC transfer callback typedef. More... | |
typedef void(* | i2c_dmac_master_irq_handler_t )(I2C_Type *base, i2c_master_dmac_handle_t *handle) |
Typedef for master dmac handler. More... | |
Driver version | |
#define | FSL_I2C_DMAC_DRIVER_VERSION (MAKE_VERSION(2, 0, 2)) |
I2C DMAC driver version. More... | |
I2C Master DMAC Transfer Sub-group | |
void | I2C_MasterTransferCreateHandleDMAC (I2C_Type *base, i2c_master_dmac_handle_t *handle, i2c_master_dmac_transfer_callback_t callback, void *userData, dmac_handle_t *dmacTxHandle, dmac_handle_t *dmacRxHandle) |
Initializes the I2C master transfer in DMAC way. More... | |
status_t | I2C_MasterTransferDMAC (I2C_Type *base, i2c_master_dmac_handle_t *handle, i2c_master_transfer_t *xfer) |
Initiates a master transfer on the I2C bus in DMAC way. More... | |
void | I2C_MasterTransferAbortDMAC (I2C_Type *base, i2c_master_dmac_handle_t *handle) |
Aborts an in-process transfer in DMAC way. More... | |
struct _i2c_master_dmac_handle |
I2C master DMAC handle typedef.
Data Fields | |
I2C_Type * | base |
I2C instance base pointer. More... | |
size_t | transferSize |
Total bytes to be transferred. More... | |
volatile size_t | dataSize |
Left bytes to be transferred. More... | |
uint8_t *volatile | data |
Pointer to the user send/receive data buffer. More... | |
uint16_t | txData [I2C_TX_LENGTH] |
The buffer of re-allocated 16-bit width data to be written to tx register. More... | |
dmac_channel_transfer_config_t | dmacTxConfig |
The DMAC transfer configuration to transmit data. More... | |
uint8_t | state |
I2C master transfer status. More... | |
dmac_handle_t * | dmacTxHandle |
The DMAC handler used for tx. More... | |
dmac_handle_t * | dmacRxHandle |
The DMAC handler used for rx. More... | |
i2c_master_dmac_transfer_callback_t | completionCallback |
A callback function called after the DMAC transfer finished. More... | |
void * | userData |
A callback parameter passed to the callback function. More... | |
I2C_Type* i2c_master_dmac_handle_t::base |
size_t i2c_master_dmac_handle_t::transferSize |
volatile size_t i2c_master_dmac_handle_t::dataSize |
uint8_t* volatile i2c_master_dmac_handle_t::data |
uint16_t i2c_master_dmac_handle_t::txData[I2C_TX_LENGTH] |
dmac_channel_transfer_config_t i2c_master_dmac_handle_t::dmacTxConfig |
uint8_t i2c_master_dmac_handle_t::state |
dmac_handle_t* i2c_master_dmac_handle_t::dmacTxHandle |
dmac_handle_t* i2c_master_dmac_handle_t::dmacRxHandle |
i2c_master_dmac_transfer_callback_t i2c_master_dmac_handle_t::completionCallback |
void* i2c_master_dmac_handle_t::userData |
#define FSL_I2C_DMAC_DRIVER_VERSION (MAKE_VERSION(2, 0, 2)) |
#define I2C_TX_LENGTH 8U |
Buffer length of re-allocated 16-bit width data.
typedef void(* i2c_master_dmac_transfer_callback_t)(I2C_Type *base, i2c_master_dmac_handle_t *handle, status_t status, void *userData) |
typedef void(* i2c_dmac_master_irq_handler_t)(I2C_Type *base, i2c_master_dmac_handle_t *handle) |
void I2C_MasterTransferCreateHandleDMAC | ( | I2C_Type * | base, |
i2c_master_dmac_handle_t * | handle, | ||
i2c_master_dmac_transfer_callback_t | callback, | ||
void * | userData, | ||
dmac_handle_t * | dmacTxHandle, | ||
dmac_handle_t * | dmacRxHandle | ||
) |
base | I2C peripheral base address |
handle | Pointer to i2c_master_dmac_handle_t structure to store the transfer state. |
callback | Pointer to the user callback function |
userData | User configurable pointer to any data, function, structure etc that user wish to use in the callback |
dmacTxHandle | DMAC handle pointer for tx |
dmacRxHandle | DMAC handle pointer for rx |
status_t I2C_MasterTransferDMAC | ( | I2C_Type * | base, |
i2c_master_dmac_handle_t * | handle, | ||
i2c_master_transfer_t * | xfer | ||
) |
base | I2C base pointer |
handle | pointer to i2c_master_transfer_handle_t structure which stores the transfer state. |
xfer | Pointer to the transfer configuration structure. |
kStatus_Success | Successfully start the data transmission. |
kStatus_I2C_Busy | Previous transmission still not finished. |
void I2C_MasterTransferAbortDMAC | ( | I2C_Type * | base, |
i2c_master_dmac_handle_t * | handle | ||
) |
base | I2C base pointer. |
handle | Pointer to i2c_master_handle_t structure which stores the transfer state |