![]() |
MCUXpresso SDK API Reference Manual
Rev 2.16.000
NXP Semiconductors
|
Data Structures | |
struct | i3c_slave_edma_transfer_t |
I3C slave transfer structure. More... | |
struct | i3c_slave_edma_handle_t |
I3C slave edma handle structure. More... | |
Typedefs | |
typedef void(* | i3c_slave_edma_callback_t )(I3C_Type *base, i3c_slave_edma_transfer_t *transfer, void *userData) |
Slave event callback function pointer type. More... | |
Slave DMA | |
void | I3C_SlaveTransferCreateHandleEDMA (I3C_Type *base, i3c_slave_edma_handle_t *handle, i3c_slave_edma_callback_t callback, void *userData, edma_handle_t *rxDmaHandle, edma_handle_t *txDmaHandle) |
Create a new handle for the I3C slave DMA APIs. More... | |
status_t | I3C_SlaveTransferEDMA (I3C_Type *base, i3c_slave_edma_handle_t *handle, i3c_slave_edma_transfer_t *transfer, uint32_t eventMask) |
Prepares for a non-blocking DMA-based transaction on the I3C bus. More... | |
void | I3C_SlaveTransferAbortEDMA (I3C_Type *base, i3c_slave_edma_handle_t *handle) |
Abort a slave edma non-blocking transfer in a early time. More... | |
void | I3C_SlaveTransferEDMAHandleIRQ (I3C_Type *base, void *i3cHandle) |
Reusable routine to handle slave interrupts. More... | |
struct i3c_slave_edma_transfer_t |
Data Fields | |
uint32_t | event |
Reason the callback is being invoked. More... | |
uint8_t * | txData |
Transfer buffer. | |
size_t | txDataSize |
Transfer size. | |
uint8_t * | rxData |
Transfer buffer. | |
size_t | rxDataSize |
Transfer size. | |
status_t | completionStatus |
Success or error code describing how the transfer completed. More... | |
uint32_t i3c_slave_edma_transfer_t::event |
status_t i3c_slave_edma_transfer_t::completionStatus |
Only applies for kI3C_SlaveCompletionEvent.
struct _i3c_slave_edma_handle |
Data Fields | |
I3C_Type * | base |
I3C base pointer. More... | |
i3c_slave_edma_transfer_t | transfer |
I3C slave transfer copy. More... | |
bool | isBusy |
Whether transfer is busy. More... | |
bool | wasTransmit |
Whether the last transfer was a transmit. More... | |
uint32_t | eventMask |
Mask of enabled events. More... | |
i3c_slave_edma_callback_t | callback |
Callback function called at transfer event. More... | |
edma_handle_t * | rxDmaHandle |
Handle for receive DMA channel. More... | |
edma_handle_t * | txDmaHandle |
Handle for transmit DMA channel. More... | |
void * | userData |
Callback parameter passed to callback. More... | |
I3C_Type* i3c_slave_edma_handle_t::base |
i3c_slave_edma_transfer_t i3c_slave_edma_handle_t::transfer |
bool i3c_slave_edma_handle_t::isBusy |
bool i3c_slave_edma_handle_t::wasTransmit |
uint32_t i3c_slave_edma_handle_t::eventMask |
i3c_slave_edma_callback_t i3c_slave_edma_handle_t::callback |
edma_handle_t* i3c_slave_edma_handle_t::rxDmaHandle |
edma_handle_t* i3c_slave_edma_handle_t::txDmaHandle |
void* i3c_slave_edma_handle_t::userData |
typedef void(* i3c_slave_edma_callback_t)(I3C_Type *base, i3c_slave_edma_transfer_t *transfer, void *userData) |
This callback is used only for the slave DMA transfer API.
base | Base address for the I3C instance on which the event occurred. |
handle | Pointer to slave DMA transfer handle. |
transfer | Pointer to transfer descriptor containing values passed to and/or from the callback. |
userData | Arbitrary pointer-sized value passed from the application. |
void I3C_SlaveTransferCreateHandleEDMA | ( | I3C_Type * | base, |
i3c_slave_edma_handle_t * | handle, | ||
i3c_slave_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_SlaveTransferAbortDMA() 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.
base | The I3C peripheral base address. |
handle | Pointer to the I3C slave driver handle. |
callback | User provided pointer to the asynchronous callback function. |
userData | User provided pointer to the application callback data. |
rxDmaHandle | Handle for the DMA receive channel. Created by the user prior to calling this function. |
txDmaHandle | Handle for the DMA transmit channel. Created by the user prior to calling this function. |
status_t I3C_SlaveTransferEDMA | ( | I3C_Type * | base, |
i3c_slave_edma_handle_t * | handle, | ||
i3c_slave_edma_transfer_t * | transfer, | ||
uint32_t | eventMask | ||
) |
The API will do DMA configuration according to the input transfer descriptor, and the data will be transferred when there's bus master requesting transfer from/to this slave. So the timing of call to this API need be aligned with master application to ensure the transfer is executed as expected. Callback specified when the handle was created is invoked when the transaction has completed.
base | The I3C peripheral base address. |
handle | Pointer to the I3C slave driver handle. |
transfer | The pointer to the transfer descriptor. |
eventMask | Bit mask formed by OR'ing together i3c_slave_transfer_event_t enumerators to specify which events to send to the callback. The transmit and receive events is not allowed to be enabled. |
kStatus_Success | The transaction was started successfully. |
kStatus_I3C_Busy | Either another master is currently utilizing the bus, or another DMA transaction is already in progress. |
kStatus_Fail | The transaction can't be set. |
void I3C_SlaveTransferAbortEDMA | ( | I3C_Type * | base, |
i3c_slave_edma_handle_t * | handle | ||
) |
base | I3C peripheral base address |
handle | pointer to i3c_slave_edma_handle_t structure |
void I3C_SlaveTransferEDMAHandleIRQ | ( | I3C_Type * | base, |
void * | i3cHandle | ||
) |
base | The I3C peripheral base address. |
i3cHandle | Pointer to the I3C slave DMA driver handle. |