MCUXpresso SDK API Reference Manual  Rev. 0
NXP Semiconductors
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

Overview

Data Structures

struct  i2c_master_dma_handle_t
 I2C master DMA transfer structure. More...
 

Typedefs

typedef void(* i2c_master_dma_transfer_callback_t )(I2C_Type *base, i2c_master_dma_handle_t *handle, status_t status, void *userData)
 I2C master DMA transfer callback typedef. More...
 

I2C Block DMA Transfer Operation

void I2C_MasterTransferCreateHandleDMA (I2C_Type *base, i2c_master_dma_handle_t *handle, i2c_master_dma_transfer_callback_t callback, void *userData, dma_handle_t *dmaHandle)
 Initializes the I2C handle which is used in transcational functions. More...
 
status_t I2C_MasterTransferDMA (I2C_Type *base, i2c_master_dma_handle_t *handle, i2c_master_transfer_t *xfer)
 Performs a master DMA non-blocking transfer on the I2C bus. More...
 
status_t I2C_MasterTransferGetCountDMA (I2C_Type *base, i2c_master_dma_handle_t *handle, size_t *count)
 Gets a master transfer status during a DMA non-blocking transfer. More...
 
void I2C_MasterTransferAbortDMA (I2C_Type *base, i2c_master_dma_handle_t *handle)
 Aborts a master DMA non-blocking transfer early. More...
 

Data Structure Documentation

struct _i2c_master_dma_handle

I2C master DMA handle typedef.

Data Fields

i2c_master_transfer_t transfer
 I2C master transfer struct. More...
 
size_t transferSize
 Total bytes to be transferred. More...
 
uint8_t state
 I2C master transfer status. More...
 
dma_handle_t * dmaHandle
 The DMA handler used. More...
 
i2c_master_dma_transfer_callback_t completionCallback
 A callback function called after the DMA transfer finished. More...
 
void * userData
 A callback parameter passed to the callback function. More...
 

Field Documentation

i2c_master_transfer_t i2c_master_dma_handle_t::transfer
size_t i2c_master_dma_handle_t::transferSize
uint8_t i2c_master_dma_handle_t::state
dma_handle_t* i2c_master_dma_handle_t::dmaHandle
i2c_master_dma_transfer_callback_t i2c_master_dma_handle_t::completionCallback
void* i2c_master_dma_handle_t::userData

Typedef Documentation

typedef void(* i2c_master_dma_transfer_callback_t)(I2C_Type *base, i2c_master_dma_handle_t *handle, status_t status, void *userData)

Function Documentation

void I2C_MasterTransferCreateHandleDMA ( I2C_Type *  base,
i2c_master_dma_handle_t *  handle,
i2c_master_dma_transfer_callback_t  callback,
void *  userData,
dma_handle_t *  dmaHandle 
)
Parameters
baseI2C peripheral base address
handlePointer to the i2c_master_dma_handle_t structure
callbackPointer to the user callback function
userDataA user parameter passed to the callback function
dmaHandleDMA handle pointer
status_t I2C_MasterTransferDMA ( I2C_Type *  base,
i2c_master_dma_handle_t *  handle,
i2c_master_transfer_t xfer 
)
Parameters
baseI2C peripheral base address
handleA pointer to the i2c_master_dma_handle_t structure
xferA pointer to the transfer structure of the i2c_master_transfer_t
Return values
kStatus_SuccessSucessfully completes the data transmission.
kStatus_I2C_BusyA previous transmission is still not finished.
kStatus_I2C_TimeoutA transfer error, waits for the signal timeout.
kStatus_I2C_ArbitrationLostA transfer error, arbitration lost.
kStataus_I2C_NakA transfer error, receives NAK during transfer.
status_t I2C_MasterTransferGetCountDMA ( I2C_Type *  base,
i2c_master_dma_handle_t *  handle,
size_t *  count 
)
Parameters
baseI2C peripheral base address
handleA pointer to the i2c_master_dma_handle_t structure
countA number of bytes transferred so far by the non-blocking transaction.
void I2C_MasterTransferAbortDMA ( I2C_Type *  base,
i2c_master_dma_handle_t *  handle 
)
Parameters
baseI2C peripheral base address
handleA pointer to the i2c_master_dma_handle_t structure.