MCUXpresso SDK API Reference Manual
Rev. 0
NXP Semiconductors
|
The I2C_EDMA module provide a method for I2C transfer operation based on EDMA.
Data Structures | |
struct | i2c_master_edma_transfer_handle_t |
I2C master eDMA transfer structure. More... | |
Typedefs | |
typedef void(* | i2c_master_edma_transfer_callback_t )(i2c_master_edma_transfer_handle_t *handle) |
I2C master eDMA transfer callback typedef. More... | |
Driver version | |
#define | FSL_I2C_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) |
I2C Block eDMA Transfer Operation | |
void | I2C_MasterCreateEDMAHandle (I2C_Type *base, i2c_master_edma_transfer_handle_t *psHandle, i2c_master_edma_transfer_callback_t pfCallback, void *pUserData, DMA_Type *edmaBase, edma_channel_t eEdmaChannel) |
Initializes the I2C handle which is used in transactional functions. More... | |
status_t | I2C_MasterTransferEDMA (i2c_master_edma_transfer_handle_t *psHandle, i2c_master_transfer_t *psTransfer) |
Performs a master eDMA non-blocking transfer on the I2C bus. More... | |
status_t | I2C_MasterTransferGetCountEDMA (i2c_master_edma_transfer_handle_t *psHandle, uint16_t *pu16Count) |
Gets a master transfer status during the eDMA non-blocking transfer. More... | |
void | I2C_MasterTransferAbortEDMA (i2c_master_edma_transfer_handle_t *psHandle) |
Aborts a master eDMA non-blocking transfer early. More... | |
struct _i2c_master_edma_transfer_handle |
Retry times for waiting flag.
I2C master eDMA handle typedef.
Data Fields | |
I2C_Type * | base |
I2C base pointer to the I2C instance that assigned to this handle. More... | |
i2c_master_transfer_t | sTransfer |
I2C master transfer structure. More... | |
uint16_t | u16TransferSize |
Total bytes to be transferred. More... | |
uint8_t | u8State |
I2C master transfer status. More... | |
edma_handle_t | sEdmaHandle |
The eDMA handler used. More... | |
status_t | completionStatus |
I2C master transfer complete status, indicating how the transfer ends. More... | |
i2c_master_edma_transfer_callback_t | pfCallback |
A callback function called after the eDMA transfer is finished. More... | |
void * | pUserData |
User configurable pointer to any data, function, structure etc that user wish to use in the callback | |
I2C_Type* i2c_master_edma_transfer_handle_t::base |
i2c_master_transfer_t i2c_master_edma_transfer_handle_t::sTransfer |
uint16_t i2c_master_edma_transfer_handle_t::u16TransferSize |
uint8_t i2c_master_edma_transfer_handle_t::u8State |
edma_handle_t i2c_master_edma_transfer_handle_t::sEdmaHandle |
status_t i2c_master_edma_transfer_handle_t::completionStatus |
i2c_master_edma_transfer_callback_t i2c_master_edma_transfer_handle_t::pfCallback |
typedef void(* i2c_master_edma_transfer_callback_t)(i2c_master_edma_transfer_handle_t *handle) |
void I2C_MasterCreateEDMAHandle | ( | I2C_Type * | base, |
i2c_master_edma_transfer_handle_t * | psHandle, | ||
i2c_master_edma_transfer_callback_t | pfCallback, | ||
void * | pUserData, | ||
DMA_Type * | edmaBase, | ||
edma_channel_t | eEdmaChannel | ||
) |
base | I2C peripheral base address. |
psHandle | A pointer to the i2c_master_edma_transfer_handle_t structure. |
pfCallback | A pointer to the user callback function. |
pUserData | A user parameter passed to the callback function. |
edmaBase | Edma base address. |
eEdmaChannel | eDMA channel for master transfer. |
status_t I2C_MasterTransferEDMA | ( | i2c_master_edma_transfer_handle_t * | psHandle, |
i2c_master_transfer_t * | psTransfer | ||
) |
psHandle | A pointer to the i2c_master_edma_transfer_handle_t structure. |
psTransfer | A pointer to the transfer structure of i2c_master_transfer_t. |
kStatus_Success | Successfully completed the data transmission. |
kStatus_I2C_Busy | A previous transmission is still not finished. |
kStatus_I2C_Timeout | Transfer error, waits for a signal timeout. |
kStatus_I2C_ArbitrationLost | Transfer error, arbitration lost. |
kStataus_I2C_Nak | Transfer error, receive NAK during transfer. |
status_t I2C_MasterTransferGetCountEDMA | ( | i2c_master_edma_transfer_handle_t * | psHandle, |
uint16_t * | pu16Count | ||
) |
psHandle | A pointer to the i2c_master_edma_transfer_handle_t structure. |
pu16Count | A number of bytes transferred by the non-blocking transaction. |
void I2C_MasterTransferAbortEDMA | ( | i2c_master_edma_transfer_handle_t * | psHandle | ) |
psHandle | A pointer to the i2c_master_edma_transfer_handle_t structure. |