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

Overview

Data Structures

struct  i3c_master_edma_callback_t
 i3c master callback functions. More...
 
struct  i3c_master_edma_handle_t
 Driver handle for master EDMA APIs. More...
 

Master DMA

void I3C_MasterTransferCreateHandleEDMA (I3C_Type *base, i3c_master_edma_handle_t *handle, const i3c_master_edma_callback_t *callback, void *userData, edma_handle_t *rxDmaHandle, edma_handle_t *txDmaHandle)
 Create a new handle for the I3C master DMA APIs. More...
 
status_t I3C_MasterTransferEDMA (I3C_Type *base, i3c_master_edma_handle_t *handle, i3c_master_transfer_t *transfer)
 Performs a non-blocking DMA-based transaction on the I3C bus. More...
 
status_t I3C_MasterTransferGetCountEDMA (I3C_Type *base, i3c_master_edma_handle_t *handle, size_t *count)
 Returns number of bytes transferred so far. More...
 
void I3C_MasterTransferAbortEDMA (I3C_Type *base, i3c_master_edma_handle_t *handle)
 Terminates a non-blocking I3C master transmission early. More...
 
void I3C_MasterTransferEDMAHandleIRQ (I3C_Type *base, void *i3cHandle)
 Reusable routine to handle master interrupts. More...
 

Data Structure Documentation

struct i3c_master_edma_callback_t

Data Fields

void(* slave2Master )(I3C_Type *base, void *userData)
 Transfer complete callback.
 
void(* ibiCallback )(I3C_Type *base, i3c_master_edma_handle_t *handle, i3c_ibi_type_t ibiType, i3c_ibi_state_t ibiState)
 IBI event callback.
 
void(* transferComplete )(I3C_Type *base, i3c_master_edma_handle_t *handle, status_t status, void *userData)
 Transfer complete callback.
 
struct _i3c_master_edma_handle
Note
The contents of this structure are private and subject to change.

Data Fields

I3C_Type * base
 I3C base pointer. More...
 
uint8_t state
 Transfer state machine current state. More...
 
uint32_t transferCount
 Indicates progress of the transfer.
 
uint8_t subaddressBuffer [4]
 Saving subaddress command. More...
 
uint8_t subaddressCount
 Saving command count. More...
 
i3c_master_transfer_t transfer
 Copy of the current transfer info. More...
 
i3c_master_edma_callback_t callback
 Callback function pointer. More...
 
void * userData
 Application data passed to callback. More...
 
edma_handle_trxDmaHandle
 Handle for receive DMA channel. More...
 
edma_handle_ttxDmaHandle
 Handle for transmit DMA channel. More...
 
uint8_t ibiAddress
 Slave address which request IBI. More...
 
uint8_t * ibiBuff
 Pointer to IBI buffer to keep ibi bytes. More...
 
size_t ibiPayloadSize
 IBI payload size. More...
 
i3c_ibi_type_t ibiType
 IBI type. More...
 

Field Documentation

I3C_Type* i3c_master_edma_handle_t::base
uint8_t i3c_master_edma_handle_t::state
uint8_t i3c_master_edma_handle_t::subaddressBuffer[4]
uint8_t i3c_master_edma_handle_t::subaddressCount
i3c_master_transfer_t i3c_master_edma_handle_t::transfer
i3c_master_edma_callback_t i3c_master_edma_handle_t::callback
void* i3c_master_edma_handle_t::userData
edma_handle_t* i3c_master_edma_handle_t::rxDmaHandle
edma_handle_t* i3c_master_edma_handle_t::txDmaHandle
uint8_t i3c_master_edma_handle_t::ibiAddress
uint8_t* i3c_master_edma_handle_t::ibiBuff
size_t i3c_master_edma_handle_t::ibiPayloadSize
i3c_ibi_type_t i3c_master_edma_handle_t::ibiType

Function Documentation

void I3C_MasterTransferCreateHandleEDMA ( I3C_Type *  base,
i3c_master_edma_handle_t *  handle,
const i3c_master_edma_callback_t callback,
void *  userData,
edma_handle_t rxDmaHandle,
edma_handle_t txDmaHandle 
)

The creation of a handle is for use with the DMA APIs. Once a handle is created, there is not a corresponding destroy handle. If the user wants to terminate a transfer, the I3C_MasterTransferAbortDMA() API shall be called.

For devices where the I3C send and receive DMA requests are OR'd together, the txDmaHandle parameter is ignored and may be set to NULL.

Parameters
baseThe I3C peripheral base address.
handlePointer to the I3C master driver handle.
callbackUser provided pointer to the asynchronous callback function.
userDataUser provided pointer to the application callback data.
rxDmaHandleHandle for the DMA receive channel. Created by the user prior to calling this function.
txDmaHandleHandle for the DMA transmit channel. Created by the user prior to calling this function.
status_t I3C_MasterTransferEDMA ( I3C_Type *  base,
i3c_master_edma_handle_t *  handle,
i3c_master_transfer_t *  transfer 
)

The callback specified when the handle was created is invoked when the transaction has completed.

Parameters
baseThe I3C peripheral base address.
handlePointer to the I3C master driver handle.
transferThe pointer to the transfer descriptor.
Return values
kStatus_SuccessThe transaction was started successfully.
kStatus_I3C_BusyEither another master is currently utilizing the bus, or another DMA transaction is already in progress.
status_t I3C_MasterTransferGetCountEDMA ( I3C_Type *  base,
i3c_master_edma_handle_t *  handle,
size_t *  count 
)
Parameters
baseThe I3C peripheral base address.
handlePointer to the I3C master driver handle.
[out]countNumber of bytes transferred so far by the non-blocking transaction.
Return values
kStatus_Success
kStatus_NoTransferInProgressThere is not a DMA transaction currently in progress.
void I3C_MasterTransferAbortEDMA ( I3C_Type *  base,
i3c_master_edma_handle_t *  handle 
)
Note
It is not safe to call this function from an IRQ handler that has a higher priority than the DMA peripheral's IRQ priority.
Parameters
baseThe I3C peripheral base address.
handlePointer to the I3C master driver handle.
void I3C_MasterTransferEDMAHandleIRQ ( I3C_Type *  base,
void *  i3cHandle 
)
Note
This function does not need to be called unless you are reimplementing the nonblocking API's interrupt handler routines to add special functionality.
Parameters
baseThe I3C peripheral base address.
i3cHandlePointer to the I3C master DMA driver handle.