RTEMS 6.1-rc1
|
Data Structures | |
struct | _lpspi_master_edma_handle |
LPSPI master eDMA transfer handle structure used for transactional API. More... | |
struct | _lpspi_slave_edma_handle |
LPSPI slave eDMA transfer handle structure used for transactional API. More... | |
Driver version | |
typedef struct _lpspi_master_edma_handle | lpspi_master_edma_handle_t |
Forward declaration of the _lpspi_master_edma_handle typedefs. | |
typedef struct _lpspi_slave_edma_handle | lpspi_slave_edma_handle_t |
Forward declaration of the _lpspi_slave_edma_handle typedefs. | |
typedef void(* | lpspi_master_edma_transfer_callback_t) (LPSPI_Type *base, lpspi_master_edma_handle_t *handle, status_t status, void *userData) |
Completion callback function pointer type. More... | |
typedef void(* | lpspi_slave_edma_transfer_callback_t) (LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, status_t status, void *userData) |
Completion callback function pointer type. More... | |
void | LPSPI_MasterTransferCreateHandleEDMA (LPSPI_Type *base, lpspi_master_edma_handle_t *handle, lpspi_master_edma_transfer_callback_t callback, void *userData, edma_handle_t *edmaRxRegToRxDataHandle, edma_handle_t *edmaTxDataToTxRegHandle) |
Initializes the LPSPI master eDMA handle. More... | |
status_t | LPSPI_MasterTransferEDMA (LPSPI_Type *base, lpspi_master_edma_handle_t *handle, lpspi_transfer_t *transfer) |
LPSPI master transfer data using eDMA. More... | |
void | LPSPI_MasterTransferAbortEDMA (LPSPI_Type *base, lpspi_master_edma_handle_t *handle) |
LPSPI master aborts a transfer which is using eDMA. More... | |
status_t | LPSPI_MasterTransferGetCountEDMA (LPSPI_Type *base, lpspi_master_edma_handle_t *handle, size_t *count) |
Gets the master eDMA transfer remaining bytes. More... | |
void | LPSPI_SlaveTransferCreateHandleEDMA (LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, lpspi_slave_edma_transfer_callback_t callback, void *userData, edma_handle_t *edmaRxRegToRxDataHandle, edma_handle_t *edmaTxDataToTxRegHandle) |
Initializes the LPSPI slave eDMA handle. More... | |
status_t | LPSPI_SlaveTransferEDMA (LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, lpspi_transfer_t *transfer) |
LPSPI slave transfers data using eDMA. More... | |
void | LPSPI_SlaveTransferAbortEDMA (LPSPI_Type *base, lpspi_slave_edma_handle_t *handle) |
LPSPI slave aborts a transfer which is using eDMA. More... | |
status_t | LPSPI_SlaveTransferGetCountEDMA (LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, size_t *count) |
Gets the slave eDMA transfer remaining bytes. More... | |
#define | FSL_LPSPI_EDMA_DRIVER_VERSION (MAKE_VERSION(2, 3, 1)) |
LPSPI EDMA driver version. | |
typedef void(* lpspi_master_edma_transfer_callback_t) (LPSPI_Type *base, lpspi_master_edma_handle_t *handle, status_t status, void *userData) |
Completion callback function pointer type.
base | LPSPI peripheral base address. |
handle | Pointer to the handle for the LPSPI master. |
status | Success or error code describing whether the transfer completed. |
userData | Arbitrary pointer-dataSized value passed from the application. |
typedef void(* lpspi_slave_edma_transfer_callback_t) (LPSPI_Type *base, lpspi_slave_edma_handle_t *handle, status_t status, void *userData) |
Completion callback function pointer type.
base | LPSPI peripheral base address. |
handle | Pointer to the handle for the LPSPI slave. |
status | Success or error code describing whether the transfer completed. |
userData | Arbitrary pointer-dataSized value passed from the application. |
void LPSPI_MasterTransferAbortEDMA | ( | LPSPI_Type * | base, |
lpspi_master_edma_handle_t * | handle | ||
) |
LPSPI master aborts a transfer which is using eDMA.
This function aborts a transfer which is using eDMA.
base | LPSPI peripheral base address. |
handle | pointer to lpspi_master_edma_handle_t structure which stores the transfer state. |
brief LPSPI master aborts a transfer which is using eDMA.
This function aborts a transfer which is using eDMA.
param base LPSPI peripheral base address. param handle pointer to lpspi_master_edma_handle_t structure which stores the transfer state.
void LPSPI_MasterTransferCreateHandleEDMA | ( | LPSPI_Type * | base, |
lpspi_master_edma_handle_t * | handle, | ||
lpspi_master_edma_transfer_callback_t | callback, | ||
void * | userData, | ||
edma_handle_t * | edmaRxRegToRxDataHandle, | ||
edma_handle_t * | edmaTxDataToTxRegHandle | ||
) |
Initializes the LPSPI master eDMA handle.
This function initializes the LPSPI eDMA handle which can be used for other LPSPI transactional APIs. Usually, for a specified LPSPI instance, call this API once to get the initialized handle.
Note that the LPSPI eDMA has a separated (Rx and Tx as two sources) or shared (Rx and Tx are the same source) DMA request source. (1) For a separated DMA request source, enable and set the Rx DMAMUX source for edmaRxRegToRxDataHandle and Tx DMAMUX source for edmaTxDataToTxRegHandle. (2) For a shared DMA request source, enable and set the Rx/Tx DMAMUX source for edmaRxRegToRxDataHandle.
base | LPSPI peripheral base address. |
handle | LPSPI handle pointer to lpspi_master_edma_handle_t. |
callback | LPSPI callback. |
userData | callback function parameter. |
edmaRxRegToRxDataHandle | edmaRxRegToRxDataHandle pointer to edma_handle_t. |
edmaTxDataToTxRegHandle | edmaTxDataToTxRegHandle pointer to edma_handle_t. |
brief Initializes the LPSPI master eDMA handle.
This function initializes the LPSPI eDMA handle which can be used for other LPSPI transactional APIs. Usually, for a specified LPSPI instance, call this API once to get the initialized handle.
Note that the LPSPI eDMA has a separated (Rx and Rx as two sources) or shared (Rx and Tx are the same source) DMA request source. (1) For a separated DMA request source, enable and set the Rx DMAMUX source for edmaRxRegToRxDataHandle and Tx DMAMUX source for edmaIntermediaryToTxRegHandle. (2) For a shared DMA request source, enable and set the Rx/Rx DMAMUX source for edmaRxRegToRxDataHandle.
param base LPSPI peripheral base address. param handle LPSPI handle pointer to lpspi_master_edma_handle_t. param callback LPSPI callback. param userData callback function parameter. param edmaRxRegToRxDataHandle edmaRxRegToRxDataHandle pointer to edma_handle_t. param edmaTxDataToTxRegHandle edmaTxDataToTxRegHandle pointer to edma_handle_t.
status_t LPSPI_MasterTransferEDMA | ( | LPSPI_Type * | base, |
lpspi_master_edma_handle_t * | handle, | ||
lpspi_transfer_t * | transfer | ||
) |
LPSPI master transfer data using eDMA.
This function transfers data using eDMA. This is a non-blocking function, which returns right away. When all data is transferred, the callback function is called.
Note: The transfer data size should be an integer multiple of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not an integer multiple of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
base | LPSPI peripheral base address. |
handle | pointer to lpspi_master_edma_handle_t structure which stores the transfer state. |
transfer | pointer to lpspi_transfer_t structure. |
brief LPSPI master transfer data using eDMA.
This function transfers data using eDMA. This is a non-blocking function, which returns right away. When all data is transferred, the callback function is called.
Note: The transfer data size should be an integer multiple of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not an integer multiple of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
param base LPSPI peripheral base address. param handle pointer to lpspi_master_edma_handle_t structure which stores the transfer state. param transfer pointer to lpspi_transfer_t structure. return status of status_t.
status_t LPSPI_MasterTransferGetCountEDMA | ( | LPSPI_Type * | base, |
lpspi_master_edma_handle_t * | handle, | ||
size_t * | count | ||
) |
Gets the master eDMA transfer remaining bytes.
This function gets the master eDMA transfer remaining bytes.
base | LPSPI peripheral base address. |
handle | pointer to lpspi_master_edma_handle_t structure which stores the transfer state. |
count | Number of bytes transferred so far by the EDMA transaction. |
brief Gets the master eDMA transfer remaining bytes.
This function gets the master eDMA transfer remaining bytes.
param base LPSPI peripheral base address. param handle pointer to lpspi_master_edma_handle_t structure which stores the transfer state. param count Number of bytes transferred so far by the EDMA transaction. return status of status_t.
void LPSPI_SlaveTransferAbortEDMA | ( | LPSPI_Type * | base, |
lpspi_slave_edma_handle_t * | handle | ||
) |
LPSPI slave aborts a transfer which is using eDMA.
This function aborts a transfer which is using eDMA.
base | LPSPI peripheral base address. |
handle | pointer to lpspi_slave_edma_handle_t structure which stores the transfer state. |
brief LPSPI slave aborts a transfer which is using eDMA.
This function aborts a transfer which is using eDMA.
param base LPSPI peripheral base address. param handle pointer to lpspi_slave_edma_handle_t structure which stores the transfer state.
void LPSPI_SlaveTransferCreateHandleEDMA | ( | LPSPI_Type * | base, |
lpspi_slave_edma_handle_t * | handle, | ||
lpspi_slave_edma_transfer_callback_t | callback, | ||
void * | userData, | ||
edma_handle_t * | edmaRxRegToRxDataHandle, | ||
edma_handle_t * | edmaTxDataToTxRegHandle | ||
) |
Initializes the LPSPI slave eDMA handle.
This function initializes the LPSPI eDMA handle which can be used for other LPSPI transactional APIs. Usually, for a specified LPSPI instance, call this API once to get the initialized handle.
Note that LPSPI eDMA has a separated (Rx and Tx as two sources) or shared (Rx and Tx as the same source) DMA request source.
(1) For a separated DMA request source, enable and set the Rx DMAMUX source for edmaRxRegToRxDataHandle and Tx DMAMUX source for edmaTxDataToTxRegHandle. (2) For a shared DMA request source, enable and set the Rx/Rx DMAMUX source for edmaRxRegToRxDataHandle .
base | LPSPI peripheral base address. |
handle | LPSPI handle pointer to lpspi_slave_edma_handle_t. |
callback | LPSPI callback. |
userData | callback function parameter. |
edmaRxRegToRxDataHandle | edmaRxRegToRxDataHandle pointer to edma_handle_t. |
edmaTxDataToTxRegHandle | edmaTxDataToTxRegHandle pointer to edma_handle_t. |
brief Initializes the LPSPI slave eDMA handle.
This function initializes the LPSPI eDMA handle which can be used for other LPSPI transactional APIs. Usually, for a specified LPSPI instance, call this API once to get the initialized handle.
Note that LPSPI eDMA has a separated (Rx and Tx as two sources) or shared (Rx and Tx as the same source) DMA request source.
(1) For a separated DMA request source, enable and set the Rx DMAMUX source for edmaRxRegToRxDataHandle and Tx DMAMUX source for edmaTxDataToTxRegHandle. (2) For a shared DMA request source, enable and set the Rx/Rx DMAMUX source for edmaRxRegToRxDataHandle .
param base LPSPI peripheral base address. param handle LPSPI handle pointer to lpspi_slave_edma_handle_t. param callback LPSPI callback. param userData callback function parameter. param edmaRxRegToRxDataHandle edmaRxRegToRxDataHandle pointer to edma_handle_t. param edmaTxDataToTxRegHandle edmaTxDataToTxRegHandle pointer to edma_handle_t.
status_t LPSPI_SlaveTransferEDMA | ( | LPSPI_Type * | base, |
lpspi_slave_edma_handle_t * | handle, | ||
lpspi_transfer_t * | transfer | ||
) |
LPSPI slave transfers data using eDMA.
This function transfers data using eDMA. This is a non-blocking function, which return right away. When all data is transferred, the callback function is called.
Note: The transfer data size should be an integer multiple of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not an integer multiple of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
base | LPSPI peripheral base address. |
handle | pointer to lpspi_slave_edma_handle_t structure which stores the transfer state. |
transfer | pointer to lpspi_transfer_t structure. |
brief LPSPI slave transfers data using eDMA.
This function transfers data using eDMA. This is a non-blocking function, which return right away. When all data is transferred, the callback function is called.
Note: The transfer data size should be an integer multiple of bytesPerFrame if bytesPerFrame is less than or equal to 4. For bytesPerFrame greater than 4: The transfer data size should be equal to bytesPerFrame if the bytesPerFrame is not an integer multiple of 4. Otherwise, the transfer data size can be an integer multiple of bytesPerFrame.
param base LPSPI peripheral base address. param handle pointer to lpspi_slave_edma_handle_t structure which stores the transfer state. param transfer pointer to lpspi_transfer_t structure. return status of status_t.
status_t LPSPI_SlaveTransferGetCountEDMA | ( | LPSPI_Type * | base, |
lpspi_slave_edma_handle_t * | handle, | ||
size_t * | count | ||
) |
Gets the slave eDMA transfer remaining bytes.
This function gets the slave eDMA transfer remaining bytes.
base | LPSPI peripheral base address. |
handle | pointer to lpspi_slave_edma_handle_t structure which stores the transfer state. |
count | Number of bytes transferred so far by the eDMA transaction. |
brief Gets the slave eDMA transfer remaining bytes.
This function gets the slave eDMA transfer remaining bytes.
param base LPSPI peripheral base address. param handle pointer to lpspi_slave_edma_handle_t structure which stores the transfer state. param count Number of bytes transferred so far by the eDMA transaction. return status of status_t.
volatile uint8_t _lpspi_master_edma_handle::bytesEachRead |
Bytes for each read RDR.
volatile uint8_t _lpspi_slave_edma_handle::bytesEachRead |
Bytes for each read RDR.
volatile uint8_t _lpspi_master_edma_handle::bytesEachWrite |
Bytes for each write TDR.
volatile uint8_t _lpspi_slave_edma_handle::bytesEachWrite |
Bytes for each write TDR.
volatile uint8_t _lpspi_master_edma_handle::bytesLastRead |
Bytes for last read RDR.
volatile uint8_t _lpspi_slave_edma_handle::bytesLastRead |
Bytes for last read RDR.
lpspi_master_edma_transfer_callback_t _lpspi_master_edma_handle::callback |
Completion callback.
lpspi_slave_edma_transfer_callback_t _lpspi_slave_edma_handle::callback |
Completion callback.
edma_handle_t* _lpspi_master_edma_handle::edmaRxRegToRxDataHandle |
edma_handle_t handle point used for RxReg to RxData buff
edma_handle_t* _lpspi_slave_edma_handle::edmaRxRegToRxDataHandle |
edma_handle_t handle point used for RxReg to RxData buff
edma_handle_t* _lpspi_master_edma_handle::edmaTxDataToTxRegHandle |
edma_handle_t handle point used for TxData to TxReg buff
edma_handle_t* _lpspi_slave_edma_handle::edmaTxDataToTxRegHandle |
edma_handle_t handle point used for TxData to TxReg
uint32_t _lpspi_slave_edma_handle::errorCount |
Error count for slave transfer.
volatile uint8_t _lpspi_master_edma_handle::fifoSize |
FIFO dataSize.
volatile uint8_t _lpspi_slave_edma_handle::fifoSize |
FIFO dataSize.
volatile bool _lpspi_master_edma_handle::isByteSwap |
A flag that whether should byte swap.
volatile bool _lpspi_slave_edma_handle::isByteSwap |
A flag that whether should byte swap.
volatile bool _lpspi_master_edma_handle::isPcsContinuous |
Is PCS continuous in transfer.
volatile bool _lpspi_master_edma_handle::isThereExtraRxBytes |
Is there extra RX byte.
volatile bool _lpspi_slave_edma_handle::isThereExtraRxBytes |
Is there extra RX byte.
edma_tcd_t _lpspi_slave_edma_handle::lpspiSoftwareTCD[2] |
SoftwareTCD, internal used
edma_tcd_t _lpspi_master_edma_handle::lpspiSoftwareTCD[3] |
SoftwareTCD, internal used
uint8_t _lpspi_master_edma_handle::nbytes |
eDMA minor byte transfer count initially configured.
uint8_t _lpspi_slave_edma_handle::nbytes |
eDMA minor byte transfer count initially configured.
volatile uint32_t _lpspi_master_edma_handle::readRegRemainingTimes |
Read RDR register remaining times.
volatile uint32_t _lpspi_slave_edma_handle::readRegRemainingTimes |
Read RDR register remaining times.
uint32_t _lpspi_master_edma_handle::rxBuffIfNull |
Used if there is not rxData for DMA purpose.
uint32_t _lpspi_slave_edma_handle::rxBuffIfNull |
Used if there is not rxData for DMA purpose.
uint8_t* volatile _lpspi_master_edma_handle::rxData |
Receive buffer.
uint8_t* volatile _lpspi_slave_edma_handle::rxData |
Receive buffer.
volatile size_t _lpspi_master_edma_handle::rxRemainingByteCount |
Number of bytes remaining to receive.
volatile size_t _lpspi_slave_edma_handle::rxRemainingByteCount |
Number of bytes remaining to receive.
volatile uint8_t _lpspi_master_edma_handle::rxWatermark |
Rx watermark.
volatile uint8_t _lpspi_slave_edma_handle::rxWatermark |
Rx watermark.
volatile uint8_t _lpspi_master_edma_handle::state |
LPSPI transfer state , _lpspi_transfer_state.
volatile uint8_t _lpspi_slave_edma_handle::state |
LPSPI transfer state.
uint32_t _lpspi_master_edma_handle::totalByteCount |
Number of transfer bytes
uint32_t _lpspi_slave_edma_handle::totalByteCount |
Number of transfer bytes
uint32_t _lpspi_master_edma_handle::transmitCommand |
Used to write TCR for DMA purpose.
uint32_t _lpspi_master_edma_handle::txBuffIfNull |
Used if there is not txData for DMA purpose.
uint32_t _lpspi_slave_edma_handle::txBuffIfNull |
Used if there is not txData for DMA purpose.
uint8_t* volatile _lpspi_master_edma_handle::txData |
Send buffer.
uint8_t* volatile _lpspi_slave_edma_handle::txData |
Send buffer.
volatile size_t _lpspi_master_edma_handle::txRemainingByteCount |
Number of bytes remaining to send.
volatile size_t _lpspi_slave_edma_handle::txRemainingByteCount |
Number of bytes remaining to send.
void* _lpspi_master_edma_handle::userData |
Callback user data.
void* _lpspi_slave_edma_handle::userData |
Callback user data.
volatile uint32_t _lpspi_master_edma_handle::writeRegRemainingTimes |
Write TDR register remaining times.
volatile uint32_t _lpspi_slave_edma_handle::writeRegRemainingTimes |
Write TDR register remaining times.