SDK provide eDMA transactional APIs to transfer data using eDMA, the eDMA method is similar with interrupt transactional method.
More...
- Note
- eDMA transactional functions use multiple beats method for better performance, in contrast, the blocking functions and interupt functions use single beat method. The function FLEXIO_MCULCD_ReadData, FLEXIO_MCULCD_WriteData, FLEXIO_MCULCD_GetStatusFlags, and FLEXIO_MCULCD_ClearStatusFlags are only used for single beat case, so don't use these functions to work together with eDMA functions.
flexio_MCULCD_edma_handle_t handle;
volatile bool completeFlag = false;
void flexioLcdCallback(
FLEXIO_MCULCD_Type *base, flexio_MCULCD_edma_handle_t *handle, status_t status,
void *userData)
{
{
completeFlag = true;
}
}
void main(void)
{
xfer.command = command2;
xfer.dataAddrOrSameValue = (uint32_t)dataToSend;
xfer.dataCount = sizeof(dataToSend);
completeFlag = false;
while (!completeFlag)
{
}
xfer.command = command2;
xfer.dataAddrOrSameValue = value;
xfer.dataCount = 1000;
completeFlag = false;
while (!completeFlag)
{
}
xfer.command = command3;
xfer.dataAddrOrSameValue = (uint32_t)dataToReceive;
xfer.dataCount = sizeof(dataToReceive);
completeFlag = false;
while (!completeFlag)
{
}
}