ext: mcux: Update to mcux 2.1 for k64
Updates the mcux drivers and device header files for the k64 from mcux 2.0 to mcux 2.1. Origin: NXP MCUXpresso SDK 2.1 URL: mcux.nxp.com Maintained-by: External Change-Id: Ic83acfa91b575550c92ccc124d94ecd8fdac1f57 Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
parent
a57df869b4
commit
e0b56a7076
79 changed files with 6373 additions and 4217 deletions
|
@ -37,8 +37,6 @@
|
|||
* @{
|
||||
*/
|
||||
|
||||
/*! @file */
|
||||
|
||||
/***********************************************************************************************************************
|
||||
* Definitions
|
||||
**********************************************************************************************************************/
|
||||
|
@ -57,9 +55,9 @@ typedef struct _dspi_slave_edma_handle dspi_slave_edma_handle_t;
|
|||
* @brief Completion callback function pointer type.
|
||||
*
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle Pointer to the handle for the DSPI master.
|
||||
* @param handle A pointer to the handle for the DSPI master.
|
||||
* @param status Success or error code describing whether the transfer completed.
|
||||
* @param userData Arbitrary pointer-dataSized value passed from the application.
|
||||
* @param userData An arbitrary pointer-dataSized value passed from the application.
|
||||
*/
|
||||
typedef void (*dspi_master_edma_transfer_callback_t)(SPI_Type *base,
|
||||
dspi_master_edma_handle_t *handle,
|
||||
|
@ -69,38 +67,39 @@ typedef void (*dspi_master_edma_transfer_callback_t)(SPI_Type *base,
|
|||
* @brief Completion callback function pointer type.
|
||||
*
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle Pointer to the handle for the DSPI slave.
|
||||
* @param handle A pointer to the handle for the DSPI slave.
|
||||
* @param status Success or error code describing whether the transfer completed.
|
||||
* @param userData Arbitrary pointer-dataSized value passed from the application.
|
||||
* @param userData An arbitrary pointer-dataSized value passed from the application.
|
||||
*/
|
||||
typedef void (*dspi_slave_edma_transfer_callback_t)(SPI_Type *base,
|
||||
dspi_slave_edma_handle_t *handle,
|
||||
status_t status,
|
||||
void *userData);
|
||||
|
||||
/*! @brief DSPI master eDMA transfer handle structure used for transactional API. */
|
||||
/*! @brief DSPI master eDMA transfer handle structure used for the transactional API. */
|
||||
struct _dspi_master_edma_handle
|
||||
{
|
||||
uint32_t bitsPerFrame; /*!< Desired number of bits per frame. */
|
||||
volatile uint32_t command; /*!< Desired data command. */
|
||||
volatile uint32_t lastCommand; /*!< Desired last data command. */
|
||||
uint32_t bitsPerFrame; /*!< The desired number of bits per frame. */
|
||||
volatile uint32_t command; /*!< The desired data command. */
|
||||
volatile uint32_t lastCommand; /*!< The desired last data command. */
|
||||
|
||||
uint8_t fifoSize; /*!< FIFO dataSize. */
|
||||
|
||||
volatile bool isPcsActiveAfterTransfer; /*!< Is PCS signal keep active after the last frame transfer.*/
|
||||
volatile bool isThereExtraByte; /*!< Is there extra byte.*/
|
||||
volatile bool
|
||||
isPcsActiveAfterTransfer; /*!< Indicates whether the PCS signal keeps active after the last frame transfer.*/
|
||||
|
||||
uint8_t nbytes; /*!< eDMA minor byte transfer count initially configured. */
|
||||
volatile uint8_t state; /*!< DSPI transfer state , _dspi_transfer_state.*/
|
||||
|
||||
uint8_t *volatile txData; /*!< Send buffer. */
|
||||
uint8_t *volatile rxData; /*!< Receive buffer. */
|
||||
volatile size_t remainingSendByteCount; /*!< Number of bytes remaining to send.*/
|
||||
volatile size_t remainingReceiveByteCount; /*!< Number of bytes remaining to receive.*/
|
||||
size_t totalByteCount; /*!< Number of transfer bytes*/
|
||||
volatile size_t remainingSendByteCount; /*!< A number of bytes remaining to send.*/
|
||||
volatile size_t remainingReceiveByteCount; /*!< A number of bytes remaining to receive.*/
|
||||
size_t totalByteCount; /*!< A number of transfer bytes*/
|
||||
|
||||
uint32_t rxBuffIfNull; /*!< Used if there is not rxData for DMA purpose.*/
|
||||
uint32_t txBuffIfNull; /*!< Used if there is not txData for DMA purpose.*/
|
||||
|
||||
volatile uint8_t state; /*!< DSPI transfer state , _dspi_transfer_state.*/
|
||||
|
||||
dspi_master_edma_transfer_callback_t callback; /*!< Completion callback. */
|
||||
void *userData; /*!< Callback user data. */
|
||||
|
||||
|
@ -111,33 +110,30 @@ struct _dspi_master_edma_handle
|
|||
edma_tcd_t dspiSoftwareTCD[2]; /*!<SoftwareTCD , internal used*/
|
||||
};
|
||||
|
||||
/*! @brief DSPI slave eDMA transfer handle structure used for transactional API.*/
|
||||
/*! @brief DSPI slave eDMA transfer handle structure used for the transactional API.*/
|
||||
struct _dspi_slave_edma_handle
|
||||
{
|
||||
uint32_t bitsPerFrame; /*!< Desired number of bits per frame. */
|
||||
volatile bool isThereExtraByte; /*!< Is there extra byte.*/
|
||||
uint32_t bitsPerFrame; /*!< The desired number of bits per frame. */
|
||||
|
||||
uint8_t *volatile txData; /*!< Send buffer. */
|
||||
uint8_t *volatile rxData; /*!< Receive buffer. */
|
||||
volatile size_t remainingSendByteCount; /*!< Number of bytes remaining to send.*/
|
||||
volatile size_t remainingReceiveByteCount; /*!< Number of bytes remaining to receive.*/
|
||||
size_t totalByteCount; /*!< Number of transfer bytes*/
|
||||
volatile size_t remainingSendByteCount; /*!< A number of bytes remaining to send.*/
|
||||
volatile size_t remainingReceiveByteCount; /*!< A number of bytes remaining to receive.*/
|
||||
size_t totalByteCount; /*!< A number of transfer bytes*/
|
||||
|
||||
uint32_t rxBuffIfNull; /*!< Used if there is not rxData for DMA purpose.*/
|
||||
uint32_t txBuffIfNull; /*!< Used if there is not txData for DMA purpose.*/
|
||||
uint32_t txLastData; /*!< Used if there is an extra byte when 16bits per frame for DMA purpose.*/
|
||||
|
||||
volatile uint8_t state; /*!< DSPI transfer state.*/
|
||||
uint8_t nbytes; /*!< eDMA minor byte transfer count initially configured. */
|
||||
|
||||
uint32_t errorCount; /*!< Error count for slave transfer.*/
|
||||
volatile uint8_t state; /*!< DSPI transfer state.*/
|
||||
|
||||
dspi_slave_edma_transfer_callback_t callback; /*!< Completion callback. */
|
||||
void *userData; /*!< Callback user data. */
|
||||
|
||||
edma_handle_t *edmaRxRegToRxDataHandle; /*!<edma_handle_t handle point used for RxReg to RxData buff*/
|
||||
edma_handle_t *edmaTxDataToTxRegHandle; /*!<edma_handle_t handle point used for TxData to TxReg*/
|
||||
|
||||
edma_tcd_t dspiSoftwareTCD[2]; /*!<SoftwareTCD , internal used*/
|
||||
};
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
@ -153,17 +149,18 @@ extern "C" {
|
|||
* @brief Initializes the DSPI master eDMA handle.
|
||||
*
|
||||
* This function initializes the DSPI eDMA handle which can be used for other DSPI transactional APIs. Usually, for a
|
||||
* specified DSPI instance, user need only call this API once to get the initialized handle.
|
||||
* specified DSPI instance, call this API once to get the initialized handle.
|
||||
*
|
||||
* Note that DSPI eDMA has separated (RX and TX as two sources) or shared (RX and TX are the same source) DMA request source.
|
||||
* (1)For the separated DMA request source, enable and set the RX DMAMUX source for edmaRxRegToRxDataHandle and
|
||||
* Note that DSPI eDMA has separated (RX and TX as two sources) or shared (RX and TX are the same source) DMA request
|
||||
* source.
|
||||
* (1) For the separated DMA request source, enable and set the RX DMAMUX source for edmaRxRegToRxDataHandle and
|
||||
* TX DMAMUX source for edmaIntermediaryToTxRegHandle.
|
||||
* (2)For the shared DMA request source, enable and set the RX/RX DMAMUX source for the edmaRxRegToRxDataHandle.
|
||||
* (2) For the shared DMA request source, enable and set the RX/RX DMAMUX source for the edmaRxRegToRxDataHandle.
|
||||
*
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle DSPI handle pointer to dspi_master_edma_handle_t.
|
||||
* @param callback DSPI callback.
|
||||
* @param userData callback function parameter.
|
||||
* @param userData A callback function parameter.
|
||||
* @param edmaRxRegToRxDataHandle edmaRxRegToRxDataHandle pointer to edma_handle_t.
|
||||
* @param edmaTxDataToIntermediaryHandle edmaTxDataToIntermediaryHandle pointer to edma_handle_t.
|
||||
* @param edmaIntermediaryToTxRegHandle edmaIntermediaryToTxRegHandle pointer to edma_handle_t.
|
||||
|
@ -179,34 +176,34 @@ void DSPI_MasterTransferCreateHandleEDMA(SPI_Type *base,
|
|||
/*!
|
||||
* @brief DSPI master transfer data using eDMA.
|
||||
*
|
||||
* This function transfer data using eDMA. This is non-blocking function, which returns right away. When all data
|
||||
* have been transfer, the callback function is called.
|
||||
* 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.
|
||||
*
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle pointer to dspi_master_edma_handle_t structure which stores the transfer state.
|
||||
* @param transfer pointer to dspi_transfer_t structure.
|
||||
* @param handle A pointer to the dspi_master_edma_handle_t structure which stores the transfer state.
|
||||
* @param transfer A pointer to the dspi_transfer_t structure.
|
||||
* @return status of status_t.
|
||||
*/
|
||||
status_t DSPI_MasterTransferEDMA(SPI_Type *base, dspi_master_edma_handle_t *handle, dspi_transfer_t *transfer);
|
||||
|
||||
/*!
|
||||
* @brief DSPI master aborts a transfer which using eDMA.
|
||||
* @brief DSPI master aborts a transfer which is using eDMA.
|
||||
*
|
||||
* This function aborts a transfer which using eDMA.
|
||||
* This function aborts a transfer which is using eDMA.
|
||||
*
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle pointer to dspi_master_edma_handle_t structure which stores the transfer state.
|
||||
* @param handle A pointer to the dspi_master_edma_handle_t structure which stores the transfer state.
|
||||
*/
|
||||
void DSPI_MasterTransferAbortEDMA(SPI_Type *base, dspi_master_edma_handle_t *handle);
|
||||
|
||||
/*!
|
||||
* @brief Gets the master eDMA transfer count.
|
||||
*
|
||||
* This function get the master eDMA transfer count.
|
||||
* This function gets the master eDMA transfer count.
|
||||
*
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle pointer to dspi_master_edma_handle_t structure which stores the transfer state.
|
||||
* @param count Number of bytes transferred so far by the non-blocking transaction.
|
||||
* @param handle A pointer to the dspi_master_edma_handle_t structure which stores the transfer state.
|
||||
* @param count A number of bytes transferred by the non-blocking transaction.
|
||||
* @return status of status_t.
|
||||
*/
|
||||
status_t DSPI_MasterTransferGetCountEDMA(SPI_Type *base, dspi_master_edma_handle_t *handle, size_t *count);
|
||||
|
@ -217,7 +214,8 @@ status_t DSPI_MasterTransferGetCountEDMA(SPI_Type *base, dspi_master_edma_handle
|
|||
* This function initializes the DSPI eDMA handle which can be used for other DSPI transactional APIs. Usually, for a
|
||||
* specified DSPI instance, call this API once to get the initialized handle.
|
||||
*
|
||||
* Note that DSPI eDMA has separated (RN and TX in 2 sources) or shared (RX and TX are the same source) DMA request source.
|
||||
* Note that DSPI eDMA has separated (RN and TX in 2 sources) or shared (RX and TX are the same source) DMA request
|
||||
* source.
|
||||
* (1)For the separated DMA request source, enable and set the RX DMAMUX source for edmaRxRegToRxDataHandle and
|
||||
* TX DMAMUX source for edmaTxDataToTxRegHandle.
|
||||
* (2)For the shared DMA request source, enable and set the RX/RX DMAMUX source for the edmaRxRegToRxDataHandle.
|
||||
|
@ -225,7 +223,7 @@ status_t DSPI_MasterTransferGetCountEDMA(SPI_Type *base, dspi_master_edma_handle
|
|||
* @param base DSPI peripheral base address.
|
||||
* @param handle DSPI handle pointer to dspi_slave_edma_handle_t.
|
||||
* @param callback DSPI callback.
|
||||
* @param userData callback function parameter.
|
||||
* @param userData A callback function parameter.
|
||||
* @param edmaRxRegToRxDataHandle edmaRxRegToRxDataHandle pointer to edma_handle_t.
|
||||
* @param edmaTxDataToTxRegHandle edmaTxDataToTxRegHandle pointer to edma_handle_t.
|
||||
*/
|
||||
|
@ -239,25 +237,25 @@ void DSPI_SlaveTransferCreateHandleEDMA(SPI_Type *base,
|
|||
/*!
|
||||
* @brief DSPI slave transfer data using eDMA.
|
||||
*
|
||||
* This function transfer data using eDMA. This is non-blocking function, which returns right away. When all data
|
||||
* have been transfer, the callback function is called.
|
||||
* Note that slave EDMA transfer cannot support the situation that transfer_size is 1 when the bitsPerFrame is greater
|
||||
* than 8 .
|
||||
* 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 that the slave eDMA transfer doesn't support transfer_size is 1 when the bitsPerFrame is greater
|
||||
* than eight.
|
||||
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle pointer to dspi_slave_edma_handle_t structure which stores the transfer state.
|
||||
* @param transfer pointer to dspi_transfer_t structure.
|
||||
* @param handle A pointer to the dspi_slave_edma_handle_t structure which stores the transfer state.
|
||||
* @param transfer A pointer to the dspi_transfer_t structure.
|
||||
* @return status of status_t.
|
||||
*/
|
||||
status_t DSPI_SlaveTransferEDMA(SPI_Type *base, dspi_slave_edma_handle_t *handle, dspi_transfer_t *transfer);
|
||||
|
||||
/*!
|
||||
* @brief DSPI slave aborts a transfer which using eDMA.
|
||||
* @brief DSPI slave aborts a transfer which is using eDMA.
|
||||
*
|
||||
* This function aborts a transfer which using eDMA.
|
||||
* This function aborts a transfer which is using eDMA.
|
||||
*
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle pointer to dspi_slave_edma_handle_t structure which stores the transfer state.
|
||||
* @param handle A pointer to the dspi_slave_edma_handle_t structure which stores the transfer state.
|
||||
*/
|
||||
void DSPI_SlaveTransferAbortEDMA(SPI_Type *base, dspi_slave_edma_handle_t *handle);
|
||||
|
||||
|
@ -267,8 +265,8 @@ void DSPI_SlaveTransferAbortEDMA(SPI_Type *base, dspi_slave_edma_handle_t *handl
|
|||
* This function gets the slave eDMA transfer count.
|
||||
*
|
||||
* @param base DSPI peripheral base address.
|
||||
* @param handle pointer to dspi_slave_edma_handle_t structure which stores the transfer state.
|
||||
* @param count Number of bytes transferred so far by the non-blocking transaction.
|
||||
* @param handle A pointer to the dspi_slave_edma_handle_t structure which stores the transfer state.
|
||||
* @param count A number of bytes transferred so far by the non-blocking transaction.
|
||||
* @return status of status_t.
|
||||
*/
|
||||
status_t DSPI_SlaveTransferGetCountEDMA(SPI_Type *base, dspi_slave_edma_handle_t *handle, size_t *count);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue