|
AM243x MCU+ SDK
10.01.00
|
|
Go to the documentation of this file.
58 #include <drivers/hw_include/csl_types.h>
59 #include <drivers/hw_include/cslr_mcspi.h>
60 #include <drivers/hw_include/cslr.h>
85 #define MCSPI_STATUS_SUCCESS ((int32_t)0)
90 #define MCSPI_STATUS_FAILURE ((int32_t)-1)
95 #define MCSPI_TIMEOUT ((int32_t)-2)
100 #define MCSPI_INVALID_PARAM ((int32_t)-3)
105 #define MCSPI_STATUS_BUSY ((int32_t)-4)
110 #define MCSPI_INVALID_STATE ((int32_t)-5)
120 #define MCSPI_NO_WAIT ((uint32_t)0)
125 #define MCSPI_WAIT_FOREVER ((uint32_t)-1)
134 #define MCSPI_STATE_RESET ((uint32_t)0U)
139 #define MCSPI_STATE_READY ((uint32_t)1U)
144 #define MCSPI_STATE_BUSY ((uint32_t)2U)
149 #define MCSPI_STATE_ERROR ((uint32_t)3U)
161 #define MCSPI_CHANNEL_0 (0U)
162 #define MCSPI_CHANNEL_1 (1U)
163 #define MCSPI_CHANNEL_2 (2U)
164 #define MCSPI_CHANNEL_3 (3U)
175 #define MCSPI_OPER_MODE_POLLED (0U)
176 #define MCSPI_OPER_MODE_INTERRUPT (1U)
177 #define MCSPI_OPER_MODE_DMA (2U)
181 #define MCSPI_MAX_NUM_CHANNELS (4U)
191 #define MCSPI_TRANSFER_COMPLETED ((int32_t)0U)
192 #define MCSPI_TRANSFER_STARTED ((int32_t)1U)
193 #define MCSPI_TRANSFER_CANCELLED ((int32_t)2U)
194 #define MCSPI_TRANSFER_FAILED ((int32_t)3U)
195 #define MCSPI_TRANSFER_CSN_DEASSERT ((int32_t)4U)
196 #define MCSPI_TRANSFER_TIMEOUT ((int32_t)5U)
215 #define MCSPI_MS_MODE_CONTROLLER (CSL_MCSPI_MODULCTRL_MS_MASTER)
217 #define MCSPI_MS_MODE_PERIPHERAL (CSL_MCSPI_MODULCTRL_MS_SLAVE)
234 #define MCSPI_FF_POL0_PHA0 (0U)
235 #define MCSPI_FF_POL0_PHA1 (1U)
236 #define MCSPI_FF_POL1_PHA0 (2U)
237 #define MCSPI_FF_POL1_PHA1 (3U)
249 #define MCSPI_CS_POL_HIGH (CSL_MCSPI_CH0CONF_EPOL_ACTIVEHIGH)
251 #define MCSPI_CS_POL_LOW (CSL_MCSPI_CH0CONF_EPOL_ACTIVELOW)
260 #define MCSPI_TR_MODE_TX_RX (CSL_MCSPI_CH0CONF_TRM_TRANSRECEI)
261 #define MCSPI_TR_MODE_RX_ONLY (CSL_MCSPI_CH0CONF_TRM_RECEIVONLY)
262 #define MCSPI_TR_MODE_TX_ONLY (CSL_MCSPI_CH0CONF_TRM_TRANSONLY)
272 #define MCSPI_IS_D0 (CSL_MCSPI_CH0CONF_IS_LINE0)
274 #define MCSPI_IS_D1 (CSL_MCSPI_CH0CONF_IS_LINE1)
284 #define MCSPI_DPE_ENABLE (CSL_MCSPI_CH0CONF_DPE0_ENABLED)
286 #define MCSPI_DPE_DISABLE (CSL_MCSPI_CH0CONF_DPE0_DISABLED)
295 #define MCSPI_SLV_CS_SELECT_0 (CSL_MCSPI_CH0CONF_SPIENSLV_SPIEN0)
296 #define MCSPI_SLV_CS_SELECT_1 (CSL_MCSPI_CH0CONF_SPIENSLV_SPIEN1)
297 #define MCSPI_SLV_CS_SELECT_2 (CSL_MCSPI_CH0CONF_SPIENSLV_SPIEN2)
298 #define MCSPI_SLV_CS_SELECT_3 (CSL_MCSPI_CH0CONF_SPIENSLV_SPIEN3)
308 #define MCSPI_SB_POL_HIGH (CSL_MCSPI_CH0CONF_SBPOL_HIGHLEVEL)
310 #define MCSPI_SB_POL_LOW (CSL_MCSPI_CH0CONF_SBPOL_LOWLEVEL)
322 #define MCSPI_TCS0_0_CLK (CSL_MCSPI_CH0CONF_TCS0_ZEROCYCLEDLY)
324 #define MCSPI_TCS0_1_CLK (CSL_MCSPI_CH0CONF_TCS0_ONECYCLEDLY)
326 #define MCSPI_TCS0_2_CLK (CSL_MCSPI_CH0CONF_TCS0_TWOCYCLEDLY)
328 #define MCSPI_TCS0_3_CLK (CSL_MCSPI_CH0CONF_TCS0_THREECYCLEDLY)
341 #define MCSPI_CH_MODE_SINGLE (CSL_MCSPI_MODULCTRL_SINGLE_SINGLE)
343 #define MCSPI_CH_MODE_MULTI (CSL_MCSPI_MODULCTRL_SINGLE_MULTI)
356 #define MCSPI_PINMODE_3PIN (CSL_MCSPI_MODULCTRL_PIN34_3PINMODE)
357 #define MCSPI_PINMODE_4PIN (CSL_MCSPI_MODULCTRL_PIN34_4PINMODE)
369 #define MCSPI_INITDLY_0 (CSL_MCSPI_MODULCTRL_INITDLY_NODELAY)
371 #define MCSPI_INITDLY_4 (CSL_MCSPI_MODULCTRL_INITDLY_4CLKDLY)
373 #define MCSPI_INITDLY_8 (CSL_MCSPI_MODULCTRL_INITDLY_8CLKDLY)
375 #define MCSPI_INITDLY_16 (CSL_MCSPI_MODULCTRL_INITDLY_16CLKDLY)
377 #define MCSPI_INITDLY_32 (CSL_MCSPI_MODULCTRL_INITDLY_32CLKDLY)
381 #define MCSPI_ERROR_TX_UNDERFLOW (0x00000001U)
382 #define MCSPI_ERROR_RX_OVERFLOW (0x00000002U)
385 #define MCSPI_MAX_CLK_DIVIDER_SUPPORTED (4096U)
392 #define MCSPI_FIFO_LENGTH (64U)
396 #define MCSPI_RX_FIFO_ENABLE ((uint32_t) CSL_MCSPI_CH0CONF_FFER_FFENABLED \
398 CSL_MCSPI_CH0CONF_FFER_SHIFT)
403 #define MCSPI_RX_FIFO_DISABLE ((uint32_t) CSL_MCSPI_CH0CONF_FFER_FFDISABLED \
404 << CSL_MCSPI_CH0CONF_FFER_SHIFT)
409 #define MCSPI_TX_FIFO_ENABLE ((uint32_t) CSL_MCSPI_CH0CONF_FFEW_FFENABLED \
410 << CSL_MCSPI_CH0CONF_FFEW_SHIFT)
415 #define MCSPI_TX_FIFO_DISABLE ((uint32_t) CSL_MCSPI_CH0CONF_FFEW_FFDISABLED \
416 << CSL_MCSPI_CH0CONF_FFEW_SHIFT)
421 #define MCSPI_REG_OFFSET (0x14U)
423 #define MCSPI_CHCONF(x) ((uint32_t) CSL_MCSPI_CH0CONF + \
424 (uint32_t) ((uint32_t) MCSPI_REG_OFFSET * \
427 #define MCSPI_CHSTAT(x) ((uint32_t) CSL_MCSPI_CH0STAT + \
428 (uint32_t) ((uint32_t) MCSPI_REG_OFFSET * \
431 #define MCSPI_CHCTRL(x) ((uint32_t) CSL_MCSPI_CH0CTRL + \
432 (uint32_t) ((uint32_t) MCSPI_REG_OFFSET * \
435 #define MCSPI_CHTX(x) ((uint32_t) CSL_MCSPI_TX0 + \
436 (uint32_t) ((uint32_t) MCSPI_REG_OFFSET * \
439 #define MCSPI_CHRX(x) ((uint32_t) CSL_MCSPI_RX0 + \
440 (uint32_t) ((uint32_t) MCSPI_REG_OFFSET * \
443 #define MCSPI_CLKD_MASK (0x0FU)
446 #define MCSPI_IRQSTATUS_CLEAR_ALL (CSL_MCSPI_IRQSTATUS_EOW_MASK | \
447 CSL_MCSPI_IRQSTATUS_WKS_MASK | \
448 CSL_MCSPI_IRQSTATUS_RX3_FULL_MASK | \
449 CSL_MCSPI_IRQSTATUS_TX3_UNDERFLOW_MASK | \
450 CSL_MCSPI_IRQSTATUS_TX3_EMPTY_MASK | \
451 CSL_MCSPI_IRQSTATUS_RX2_FULL_MASK | \
452 CSL_MCSPI_IRQSTATUS_TX2_UNDERFLOW_MASK | \
453 CSL_MCSPI_IRQSTATUS_TX2_EMPTY_MASK | \
454 CSL_MCSPI_IRQSTATUS_RX1_FULL_MASK | \
455 CSL_MCSPI_IRQSTATUS_TX1_UNDERFLOW_MASK | \
456 CSL_MCSPI_IRQSTATUS_TX1_EMPTY_MASK | \
457 CSL_MCSPI_IRQSTATUS_RX0_OVERFLOW_MASK | \
458 CSL_MCSPI_IRQSTATUS_RX0_FULL_MASK | \
459 CSL_MCSPI_IRQSTATUS_TX0_UNDERFLOW_MASK | \
460 CSL_MCSPI_IRQSTATUS_TX0_EMPTY_MASK)
534 typedef struct MCSPI_ExtendedParams_s
778 uint32_t dataSize, uint32_t csDisable);
781 uint32_t baseAddr, uint32_t intFlags)
784 CSL_REG32_WR(baseAddr + CSL_MCSPI_SYST, chObj->
systRegVal);
786 CSL_REG32_WR(baseAddr + CSL_MCSPI_IRQSTATUS, intFlags);
1101 uint32_t numWordsRxTx);
1178 static inline uint32_t
MCSPI_readChConf(uint32_t baseAddr, uint32_t chNum);
1232 uint32_t enableFlag);
1254 uint32_t enableFlag);
1291 uint32_t dataWidth);
1299 if(chConfig != NULL)
1325 trans->
txBuf = NULL;
1326 trans->
rxBuf = NULL;
1334 uint8_t bufWidthShift = 0U;
1340 else if(dataSize <= 16U)
1349 return bufWidthShift;
1385 CSL_REG32_WR(baseAddr +
MCSPI_CHTX(chNum), txData);
1390 uint32_t enableFlag)
1396 enableFlag >> CSL_MCSPI_CH0CONF_FFEW_SHIFT);
1401 uint32_t enableFlag)
1407 enableFlag >> CSL_MCSPI_CH0CONF_FFER_SHIFT);
1413 return (CSL_REG32_RD(baseAddr +
MCSPI_CHRX(chNum)));
1422 CSL_FINS(regVal, MCSPI_CH0CONF_WL, (dataWidth - 1U));
int32_t MCSPI_lld_readWriteDmaCancel(MCSPILLD_Handle hMcspi)
This API cancels current McSPI transfer in DMA mode.
uint32_t pinMode
Definition: mcspi_lld.h:712
static uint8_t MCSPI_getBufWidthShift(uint32_t dataSize)
This API will return the buffer width in bytes based on dataSize.
Definition: mcspi_lld.h:1332
uint32_t(* MCSPI_clockGet)(void)
Definition: mcspi_lld.h:76
uint8_t * curTxBufPtr
Definition: mcspi_lld.h:660
MCSPI driver initialization object.
Definition: mcspi_lld.h:701
MCSPI channel object.
Definition: mcspi_lld.h:642
uint32_t count
Definition: mcspi_lld.h:496
uint32_t txFifoTrigLvl
Definition: mcspi_lld.h:606
#define MCSPI_CHTX(x)
Base address of McSPI_CHTX(x)
Definition: mcspi_lld.h:435
#define MCSPI_FF_POL0_PHA0
Definition: mcspi_lld.h:234
uint32_t rxFifoTrigLvl
Definition: mcspi_lld.h:608
uint32_t intrNum
Definition: mcspi_lld.h:704
int32_t MCSPI_lld_readWriteCancel(MCSPILLD_Handle hMcspi)
This API cancels current McSPI transfer.
#define MCSPI_DPE_DISABLE
No transmission on Data Line.
Definition: mcspi_lld.h:286
uint32_t status
Definition: mcspi_lld.h:521
Data structure used with MCSPI_transfer()
Definition: mcspi_lld.h:475
uint32_t effTxFifoDepth
Definition: mcspi_lld.h:682
#define MCSPI_TCS0_0_CLK
0.5 clock cycles delay
Definition: mcspi_lld.h:322
static void MCSPI_writeTxDataReg(uint32_t baseAddr, uint32_t txData, uint32_t chNum)
This API will put the data on to the McSPI Channel transmit register.
Definition: mcspi_lld.h:1380
uint32_t transferDataSize
Definition: mcspi_lld.h:761
uint32_t MCSPI_lld_getBaseAddr(MCSPILLD_Handle handle)
Function to get base address of MCSPI instance of a particular handle.
uint32_t intrMask
Definition: mcspi_lld.h:686
MCSPI_clockGet clockP_get
Definition: mcspi_lld.h:726
#define MCSPI_WAIT_FOREVER
Value to use when needing a timeout of infinity or wait forver until resource is available.
Definition: mcspi_lld.h:125
uint32_t chConfRegVal
Definition: mcspi_lld.h:690
uint32_t count
Definition: tisci_rm_ra.h:6
static void MCSPI_enableTxFIFO(uint32_t baseAddr, uint32_t chNum, uint32_t enableFlag)
This API will enable/disable the Tx FIFOs of McSPI peripheral.
Definition: mcspi_lld.h:1388
int32_t MCSPI_lld_transferCancel(MCSPILLD_Handle hMcspi)
This API cancels current McSPI transfer.
uint32_t errorFlag
Definition: mcspi_lld.h:751
#define MCSPI_SLV_CS_SELECT_0
Definition: mcspi_lld.h:295
uint8_t intrPriority
Definition: mcspi_lld.h:708
void(* MCSPI_errorCallbackFxn)(void *args, uint32_t transferStatus)
The definition of a error callback function used by the SPI driver when used in MCSPI_TRANSFER_MODE_C...
Definition: mcspi_lld.h:632
uint32_t dmaChConfigNum
Definition: mcspi_lld.h:648
#define MCSPI_CHCONF(x)
Base address of McSPI_CHCONF(x)
Definition: mcspi_lld.h:423
void MCSPI_lld_controllerIsr(void *args)
This is the McSPI Controller ISR and can be used as IRQ handler in Controller mode.
int32_t MCSPI_lld_readWriteIntr(MCSPILLD_Handle hMcspi, void *txBuf, void *rxBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API reads writes data from the McSPI instance in Interrupt mode.
uint32_t bitRate
Definition: mcspi_lld.h:577
void * args
Definition: mcspi_lld.h:556
MCSPI_transferCallbackFxn transferCallbackFxn
Definition: mcspi_lld.h:728
int32_t MCSPI_lld_read(MCSPILLD_Handle hMcspi, void *rxBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API reads data from the McSPI instance in Polling mode.
static void MCSPI_lld_Transaction_init(MCSPI_Transaction *trans)
Function to initialize the MCSPI_Transaction struct to its defaults.
Definition: mcspi_lld.h:1317
MCSPI driver object.
Definition: mcspi_lld.h:738
#define MCSPI_SB_POL_LOW
Start-bit polarity is held to 0 during MCSPI transfer.
Definition: mcspi_lld.h:310
uint32_t timeout
Definition: mcspi_lld.h:519
static uint32_t MCSPI_readRxDataReg(uint32_t baseAddr, uint32_t chNum)
This API will return the data present in the MCSPI_RX register.
Definition: mcspi_lld.h:1410
#define MCSPI_DPE_ENABLE
Data line selected for transmission.
Definition: mcspi_lld.h:284
void * MCSPI_DmaHandle
Definition: mcspi_lld.h:71
uint32_t csDisable
Definition: mcspi_lld.h:479
#define MCSPI_IS_D1
Data line 1 (SPIDAT[1]) selected for reception.
Definition: mcspi_lld.h:274
uint32_t chCtrlRegVal
Definition: mcspi_lld.h:692
struct MCSPILLD_InitObject * MCSPILLD_InitHandle
void MCSPI_lld_peripheralIsr(void *args)
This is the McSPI Peripheral ISR and can be used as IRQ handler in Peripheral mode.
#define MCSPI_CHRX(x)
Base address of McSPI_CHRX(x)
Definition: mcspi_lld.h:439
int32_t MCSPI_lld_writeDma(MCSPILLD_Handle hMcspi, void *txBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API writes data to the McSPI instance in DMA mode.
uint32_t trMode
Definition: mcspi_lld.h:581
void(* MCSPI_transferCallbackFxn)(void *args, uint32_t transferStatus)
The definition of a transfer completion callback function used by the SPI driver when used in MCSPI_T...
Definition: mcspi_lld.h:623
MCSPILLD_InitHandle hMcspiInit
Definition: mcspi_lld.h:749
#define MCSPI_TR_MODE_TX_RX
Definition: mcspi_lld.h:260
#define MCSPI_CHSTAT(x)
Base address of McSPI_CHSTAT(x)
Definition: mcspi_lld.h:427
#define MCSPI_CHANNEL_0
Definition: mcspi_lld.h:161
uint32_t transferChannel
Definition: mcspi_lld.h:757
static void MCSPI_lld_ChConfig_init(MCSPI_ChConfig *chConfig)
Function to initialize the MCSPI_ChConfig struct to its defaults.
Definition: mcspi_lld.h:1297
uint32_t isOpen
Definition: mcspi_lld.h:654
static uint32_t MCSPI_readChCtrlReg(uint32_t baseAddr, uint32_t chNum)
This API returns Channel control register value.
Definition: mcspi_lld.h:1358
uint32_t state
Definition: mcspi_lld.h:745
int32_t MCSPI_lld_initDma(MCSPILLD_Handle hMcspi)
This API Initializes the McSPI instance in DMA Mode.
int32_t MCSPI_lld_deInitDma(MCSPILLD_Handle hMcspi)
This API De-Initializes the McSPI instance in DMA mode.
int32_t MCSPI_lld_transfer(MCSPILLD_Handle hMcspi, MCSPI_Transaction *transaction)
This API transfers data from the McSPI instance in Polling mode.
uint32_t curRxWords
Definition: mcspi_lld.h:668
int32_t MCSPI_lld_transferDmaCancel(MCSPILLD_Handle hMcspi)
This API cancels current McSPI transfer in DMA mode.
int32_t MCSPI_lld_init(MCSPILLD_Handle hMcspi)
This API Initializes the McSPI instance.
void MCSPI_clearAllIrqStatus(uint32_t baseAddr)
int32_t MCSPI_lld_transferDma(MCSPILLD_Handle hMcspi, MCSPI_Transaction *transaction)
This API reads data from the McSPI instance in DMA mode.
static void MCSPI_enableRxFIFO(uint32_t baseAddr, uint32_t chNum, uint32_t enableFlag)
This API will enable/disable the Rx FIFOs of McSPI peripheral.
Definition: mcspi_lld.h:1399
static void MCSPI_intrStatusClear(const MCSPI_ChObject *chObj, uint32_t baseAddr, uint32_t intFlags)
Definition: mcspi_lld.h:780
uint32_t csPolarity
Definition: mcspi_lld.h:579
uint32_t startBitPolarity
Definition: mcspi_lld.h:595
uint32_t turboEnable
Definition: mcspi_lld.h:598
uint32_t channel
Definition: mcspi_lld.h:536
void * transferMutex
Definition: mcspi_lld.h:747
uint32_t multiWordAccess
Definition: mcspi_lld.h:716
void MCSPI_reset(uint32_t baseAddr)
int32_t MCSPI_lld_writeIntr(MCSPILLD_Handle hMcspi, void *txBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API writes data to the McSPI instance in Interrupt mode.
uint32_t csDisable
Definition: mcspi_lld.h:656
void * args
Definition: mcspi_lld.h:517
uint32_t dataWidthBitMask
Definition: mcspi_lld.h:680
Data structure used with MCSPI_lld_read(), MCSPI_lld_readIntr(), MCSPI_lld_readDma(),...
Definition: mcspi_lld.h:535
uint32_t dataSize
Definition: mcspi_lld.h:545
uint32_t startBitEnable
Definition: mcspi_lld.h:592
void * txBuf
Definition: mcspi_lld.h:499
#define MCSPI_CHCTRL(x)
Base address of McSPI_CHCTRL(x)
Definition: mcspi_lld.h:431
uint32_t chMode
Definition: mcspi_lld.h:710
int32_t MCSPI_lld_reConfigFifo(MCSPILLD_Handle handle, uint32_t chNum, uint32_t numWordsRxTx)
Function to re-configure Effective FIFO Words.
void * rxBuf
Definition: mcspi_lld.h:510
uint32_t systRegVal
Definition: mcspi_lld.h:694
uint32_t effRxFifoDepth
Definition: mcspi_lld.h:684
#define MCSPI_MAX_NUM_CHANNELS
Max number of channels/Chip Select (CS) supported.
Definition: mcspi_lld.h:181
uint32_t dataSize
Definition: mcspi_lld.h:485
int32_t MCSPI_lld_write(MCSPILLD_Handle hMcspi, void *txBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API writes data to the McSPI instance in Polling mode.
uint32_t curTxWords
Definition: mcspi_lld.h:664
MCSPI_DmaHandle mcspiDmaHandle
Definition: mcspi_lld.h:724
uint32_t slvCsSelect
Definition: mcspi_lld.h:589
int32_t MCSPI_lld_deInit(MCSPILLD_Handle hMcspi)
This API De-Initializes the McSPI instance.
static uint32_t MCSPI_readChStatusReg(uint32_t baseAddr, uint32_t chNum)
This API will return the status of the McSPI channel currently in use.
Definition: mcspi_lld.h:1352
void MCSPI_stop(MCSPILLD_Handle hMcspi, MCSPI_ChObject *chObj, uint32_t chNum)
uint8_t bufWidthShift
Definition: mcspi_lld.h:674
MCSPI_Transaction transaction
Definition: mcspi_lld.h:763
struct MCSPILLD_Object * MCSPILLD_Handle
int32_t MCSPI_lld_readWriteDma(MCSPILLD_Handle hMcspi, void *txBuf, void *rxBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API reads writes data from the McSPI instance in DMA mode.
uint32_t csDisable
Definition: mcspi_lld.h:539
uint8_t * curRxBufPtr
Definition: mcspi_lld.h:662
int32_t MCSPI_lld_readIntr(MCSPILLD_Handle hMcspi, void *rxBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API reads data from the McSPI instance in Interrupt mode.
#define MCSPI_CS_POL_LOW
SPIEN (CS) is held low during the ACTIVE state.
Definition: mcspi_lld.h:251
void * args
Definition: mcspi_lld.h:765
int32_t MCSPI_lld_readWrite(MCSPILLD_Handle hMcspi, void *txBuf, void *rxBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API reads writes data from the McSPI instance in polling mode.
uint32_t defaultTxData
Definition: mcspi_lld.h:603
uint32_t dpe1
Definition: mcspi_lld.h:587
uint32_t msMode
Definition: mcspi_lld.h:718
uint32_t csEnable
Definition: mcspi_lld.h:658
uint32_t operMode
Definition: mcspi_lld.h:706
static void MCSPI_writeChCtrlReg(uint32_t baseAddr, uint32_t chNum, uint32_t regVal)
This API sets Channel control register value.
Definition: mcspi_lld.h:1363
MCSPI_ChConfig * chCfg
Definition: mcspi_lld.h:646
static uint32_t MCSPI_readChConf(uint32_t baseAddr, uint32_t chNum)
This API returns Channel Config register value.
Definition: mcspi_lld.h:1369
MCSPI_DmaChConfig dmaChCfg
Definition: mcspi_lld.h:688
uint32_t channel
Definition: mcspi_lld.h:476
int32_t MCSPI_lld_readDma(MCSPILLD_Handle hMcspi, void *rxBuf, uint32_t count, uint32_t timeout, const MCSPI_ExtendedParams *extendedParams)
This API reads data from the McSPI instance in DMA mode.
int32_t MCSPI_lld_transferIntr(MCSPILLD_Handle hMcspi, MCSPI_Transaction *transaction)
This API reads data from the McSPI instance in Interrupt mode.
uint32_t inputSelect
Definition: mcspi_lld.h:583
uint32_t baseAddr
Definition: mcspi_lld.h:739
uint32_t dpe0
Definition: mcspi_lld.h:585
void MCSPI_setChDataSize(uint32_t baseAddr, MCSPI_ChObject *chObj, uint32_t dataSize, uint32_t csDisable)
int32_t MCSPI_lld_getState(MCSPILLD_Handle hMcspi)
This API returns the driver state.
MCSPI configuration parameters for the channel.
Definition: mcspi_lld.h:572
static void MCSPI_writeChConfReg(uint32_t baseAddr, uint32_t chNum, uint32_t regVal)
This API sets Channel Config register value.
Definition: mcspi_lld.h:1374
MCSPI_errorCallbackFxn errorCallbackFxn
Definition: mcspi_lld.h:730
uint32_t transferCsDisable
Definition: mcspi_lld.h:759
uint32_t initDelay
Definition: mcspi_lld.h:714
static void MCSPI_setDataWidth(uint32_t baseAddr, uint32_t chNum, uint32_t dataWidth)
This API will set the data width in the channel config register.
Definition: mcspi_lld.h:1416
uint32_t inputClkFreq
Definition: mcspi_lld.h:702
uint32_t frameFormat
Definition: mcspi_lld.h:575
uint32_t csIdleTime
Definition: mcspi_lld.h:600
void * MCSPI_DmaChConfig
Definition: mcspi_lld.h:73
uint32_t chNum
Definition: mcspi_lld.h:573