11#include "fsl_common.h"
25#define FSL_LPSPI_DRIVER_VERSION (MAKE_VERSION(2, 4, 0))
28#ifndef LPSPI_DUMMY_DATA
30#define LPSPI_DUMMY_DATA (0x00U)
34#ifndef SPI_RETRY_TIMES
35#define SPI_RETRY_TIMES 0U
63 kLPSPI_AllStatusFlag = (LPSPI_SR_TDF_MASK | LPSPI_SR_RDF_MASK | LPSPI_SR_WCF_MASK | LPSPI_SR_FCF_MASK |
64 LPSPI_SR_TCF_MASK | LPSPI_SR_TEF_MASK | LPSPI_SR_REF_MASK | LPSPI_SR_DMF_MASK |
80 (LPSPI_IER_TDIE_MASK | LPSPI_IER_RDIE_MASK | LPSPI_IER_WCIE_MASK | LPSPI_IER_FCIE_MASK | LPSPI_IER_TCIE_MASK |
81 LPSPI_IER_TEIE_MASK | LPSPI_IER_REIE_MASK | LPSPI_IER_DMIE_MASK)
198#define LPSPI_MASTER_PCS_SHIFT (4U)
199#define LPSPI_MASTER_PCS_MASK (0xF0U)
226#define LPSPI_SLAVE_PCS_SHIFT (4U)
227#define LPSPI_SLAVE_PCS_MASK (0xF0U)
423#if defined(__cplusplus)
507static inline void LPSPI_Enable(
LPSPI_Type *base,
bool enable)
511 base->CR |= LPSPI_CR_MEN_MASK;
515 base->CR &= ~LPSPI_CR_MEN_MASK;
533static inline uint32_t LPSPI_GetStatusFlags(
LPSPI_Type *base)
543static inline uint8_t LPSPI_GetTxFifoSize(
LPSPI_Type *base)
545 return (1U << ((base->PARAM & LPSPI_PARAM_TXFIFO_MASK) >> LPSPI_PARAM_TXFIFO_SHIFT));
553static inline uint8_t LPSPI_GetRxFifoSize(
LPSPI_Type *base)
555 return (1U << ((base->PARAM & LPSPI_PARAM_RXFIFO_MASK) >> LPSPI_PARAM_RXFIFO_SHIFT));
563static inline uint32_t LPSPI_GetTxFifoCount(
LPSPI_Type *base)
565 return ((base->FSR & LPSPI_FSR_TXCOUNT_MASK) >> LPSPI_FSR_TXCOUNT_SHIFT);
573static inline uint32_t LPSPI_GetRxFifoCount(
LPSPI_Type *base)
575 return ((base->FSR & LPSPI_FSR_RXCOUNT_MASK) >> LPSPI_FSR_RXCOUNT_SHIFT);
591static inline void LPSPI_ClearStatusFlags(
LPSPI_Type *base, uint32_t statusFlags)
593 base->SR = statusFlags;
618static inline void LPSPI_EnableInterrupts(
LPSPI_Type *base, uint32_t mask)
633static inline void LPSPI_DisableInterrupts(
LPSPI_Type *base, uint32_t mask)
658static inline void LPSPI_EnableDMA(
LPSPI_Type *base, uint32_t mask)
674static inline void LPSPI_DisableDMA(
LPSPI_Type *base, uint32_t mask)
689static inline uint32_t LPSPI_GetTxRegisterAddress(
LPSPI_Type *base)
691 return (uint32_t) & (base->TDR);
704static inline uint32_t LPSPI_GetRxRegisterAddress(
LPSPI_Type *base)
706 return (uint32_t) & (base->RDR);
749 base->TCR = (base->TCR & (~LPSPI_TCR_PCS_MASK)) |
LPSPI_TCR_PCS((uint8_t)select);
763static inline void LPSPI_SetPCSContinous(
LPSPI_Type *base,
bool IsContinous)
767 base->TCR |= LPSPI_TCR_CONT_MASK;
771 base->TCR &= ~LPSPI_TCR_CONT_MASK;
781static inline bool LPSPI_IsMaster(
LPSPI_Type *base)
783 return (
bool)((base->CFGR1) & LPSPI_CFGR1_MASTER_MASK);
793static inline void LPSPI_FlushFifo(
LPSPI_Type *base,
bool flushTxFifo,
bool flushRxFifo)
795 base->CR |= ((uint32_t)flushTxFifo << LPSPI_CR_RTF_SHIFT) | ((uint32_t)flushRxFifo << LPSPI_CR_RRF_SHIFT);
809static inline void LPSPI_SetFifoWatermarks(
LPSPI_Type *base, uint32_t txWater, uint32_t rxWater)
828static inline void LPSPI_SetAllPcsPolarity(
LPSPI_Type *base, uint32_t mask)
852static inline void LPSPI_SetFrameSize(
LPSPI_Type *base, uint32_t frameSize)
854 base->TCR = (base->TCR & ~LPSPI_TCR_FRAMESZ_MASK) |
LPSPI_TCR_FRAMESZ(frameSize - 1U);
881 uint32_t baudRate_Bps,
882 uint32_t srcClock_Hz,
883 uint32_t *tcrPrescaleValue);
938 uint32_t delayTimeInNanoSec,
940 uint32_t srcClock_Hz);
954static inline void LPSPI_WriteData(
LPSPI_Type *base, uint32_t data)
968static inline uint32_t LPSPI_ReadData(
LPSPI_Type *base)
1152#if defined(__cplusplus)
#define LPSPI_TCR_FRAMESZ(x)
Definition: MIMXRT1052.h:30961
#define LPSPI_FCR_TXWATER(x)
Definition: MIMXRT1052.h:30929
#define LPSPI_TCR_PCS(x)
Definition: MIMXRT1052.h:31029
#define LPSPI_CFGR1_PCSPOL(x)
Definition: MIMXRT1052.h:30829
#define LPSPI_CFGR1_MASTER(x)
Definition: MIMXRT1052.h:30799
#define LPSPI_FCR_RXWATER(x)
Definition: MIMXRT1052.h:30935
int32_t status_t
Type used for all status and error return values.
Definition: fsl_common.h:225
#define MAKE_STATUS(group, code)
Construct a status code value from a group and code number.
Definition: fsl_common.h:47
@ kStatusGroup_LPSPI
Definition: fsl_common.h:87
struct _lpspi_slave_config lpspi_slave_config_t
LPSPI slave configuration structure.
enum _lpspi_host_request_select lpspi_host_request_select_t
LPSPI Host Request select configuration.
status_t LPSPI_SlaveTransferGetCount(LPSPI_Type *base, lpspi_slave_handle_t *handle, size_t *count)
Gets the slave transfer remaining bytes.
Definition: fsl_lpspi.c:1929
void LPSPI_MasterInit(LPSPI_Type *base, const lpspi_master_config_t *masterConfig, uint32_t srcClock_Hz)
Initializes the LPSPI master.
Definition: fsl_lpspi.c:259
_lpspi_transfer_width
LPSPI transfer width configuration.
Definition: fsl_lpspi.h:184
void LPSPI_SlaveInit(LPSPI_Type *base, const lpspi_slave_config_t *slaveConfig)
LPSPI slave configuration.
Definition: fsl_lpspi.c:355
void LPSPI_SetDummyData(LPSPI_Type *base, uint8_t dummyData)
Set up the dummy data.
Definition: fsl_lpspi.c:246
uint32_t LPSPI_MasterSetDelayTimes(LPSPI_Type *base, uint32_t delayTimeInNanoSec, lpspi_delay_type_t whichDelay, uint32_t srcClock_Hz)
Calculates the delay based on the desired delay input in nanoseconds (module must be disabled to chan...
Definition: fsl_lpspi.c:681
enum _lpspi_clock_phase lpspi_clock_phase_t
LPSPI clock phase configuration.
status_t LPSPI_SlaveTransferNonBlocking(LPSPI_Type *base, lpspi_slave_handle_t *handle, lpspi_transfer_t *transfer)
LPSPI slave transfer data using an interrupt method.
Definition: fsl_lpspi.c:1726
enum _lpspi_pcs_polarity_config lpspi_pcs_polarity_config_t
LPSPI Peripheral Chip Select (PCS) Polarity configuration.
_lpspi_match_config
LPSPI Match configuration options.
Definition: fsl_lpspi.h:156
enum _lpspi_which_pcs_config lpspi_which_pcs_t
LPSPI Peripheral Chip Select (PCS) configuration (which PCS to configure).
void LPSPI_SlaveGetDefaultConfig(lpspi_slave_config_t *slaveConfig)
Sets the lpspi_slave_config_t structure to default values.
Definition: fsl_lpspi.c:402
void(* lpspi_slave_transfer_callback_t)(LPSPI_Type *base, lpspi_slave_handle_t *handle, status_t status, void *userData)
Slave completion callback function pointer type.
Definition: fsl_lpspi.h:337
enum _lpspi_master_slave_mode lpspi_master_slave_mode_t
LPSPI master or slave mode configuration.
_lpspi_master_slave_mode
LPSPI master or slave mode configuration.
Definition: fsl_lpspi.h:93
void(* lpspi_master_transfer_callback_t)(LPSPI_Type *base, lpspi_master_handle_t *handle, status_t status, void *userData)
Master completion callback function pointer type.
Definition: fsl_lpspi.h:324
void LPSPI_Reset(LPSPI_Type *base)
Restores the LPSPI peripheral to reset state. Note that this function sets all registers to reset sta...
Definition: fsl_lpspi.c:427
_lpspi_pcs_polarity
LPSPI Peripheral Chip Select (PCS) Polarity.
Definition: fsl_lpspi.h:116
uint32_t LPSPI_MasterSetBaudRate(LPSPI_Type *base, uint32_t baudRate_Bps, uint32_t srcClock_Hz, uint32_t *tcrPrescaleValue)
Sets the LPSPI baud rate in bits per second.
Definition: fsl_lpspi.c:496
status_t LPSPI_MasterTransferBlocking(LPSPI_Type *base, lpspi_transfer_t *transfer)
LPSPI master transfer data using a polling method.
Definition: fsl_lpspi.c:1098
_lpspi_transfer_state
LPSPI transfer state, which is used for LPSPI transactional API state machine.
Definition: fsl_lpspi.h:254
void LPSPI_SlaveTransferCreateHandle(LPSPI_Type *base, lpspi_slave_handle_t *handle, lpspi_slave_transfer_callback_t callback, void *userData)
Initializes the LPSPI slave handle.
Definition: fsl_lpspi.c:1690
_lpspi_pin_config
LPSPI pin (SDO and SDI) configuration.
Definition: fsl_lpspi.h:168
_lpspi_transfer_config_flag_for_master
Use this enumeration for LPSPI master transfer configFlags.
Definition: fsl_lpspi.h:203
enum _lpspi_data_out_config lpspi_data_out_config_t
LPSPI data output configuration.
volatile uint8_t g_lpspiDummyData[]
Global variable for dummy data value setting.
Definition: fsl_lpspi.c:206
status_t LPSPI_MasterTransferNonBlocking(LPSPI_Type *base, lpspi_master_handle_t *handle, lpspi_transfer_t *transfer)
LPSPI master transfer data using an interrupt method.
Definition: fsl_lpspi.c:1226
enum _lpspi_pin_config lpspi_pin_config_t
LPSPI pin (SDO and SDI) configuration.
void LPSPI_MasterSetDelayScaler(LPSPI_Type *base, uint32_t scaler, lpspi_delay_type_t whichDelay)
Manually configures a specific LPSPI delay parameter (module must be disabled to change the delay val...
Definition: fsl_lpspi.c:608
_lpspi_pcs_polarity_config
LPSPI Peripheral Chip Select (PCS) Polarity configuration.
Definition: fsl_lpspi.h:109
_lpspi_host_request_select
LPSPI Host Request select configuration.
Definition: fsl_lpspi.h:149
#define LPSPI_MASTER_PCS_SHIFT
Definition: fsl_lpspi.h:198
struct _lpspi_master_config lpspi_master_config_t
LPSPI master configuration structure.
enum _lpspi_transfer_width lpspi_transfer_width_t
LPSPI transfer width configuration.
void LPSPI_SlaveTransferHandleIRQ(LPSPI_Type *base, lpspi_slave_handle_t *handle)
LPSPI Slave IRQ handler function.
Definition: fsl_lpspi.c:1991
void LPSPI_MasterTransferHandleIRQ(LPSPI_Type *base, lpspi_master_handle_t *handle)
LPSPI Master IRQ handler function.
Definition: fsl_lpspi.c:1558
#define LPSPI_SLAVE_PCS_SHIFT
Definition: fsl_lpspi.h:226
enum _lpspi_match_config lpspi_match_config_t
LPSPI Match configuration options.
uint32_t LPSPI_GetInstance(LPSPI_Type *base)
Get the LPSPI instance from peripheral base address.
Definition: fsl_lpspi.c:218
_lpspi_interrupt_enable
LPSPI interrupt source.
Definition: fsl_lpspi.h:70
_lpspi_shift_direction
LPSPI data shifter direction options.
Definition: fsl_lpspi.h:142
_lpspi_data_out_config
LPSPI data output configuration.
Definition: fsl_lpspi.h:177
_lpspi_which_pcs_config
LPSPI Peripheral Chip Select (PCS) configuration (which PCS to configure).
Definition: fsl_lpspi.h:100
enum _lpspi_delay_type lpspi_delay_type_t
LPSPI delay type selection.
_lpspi_delay_type
LPSPI delay type selection.
Definition: fsl_lpspi.h:192
enum _lpspi_clock_polarity lpspi_clock_polarity_t
LPSPI clock polarity configuration.
void LPSPI_SlaveTransferAbort(LPSPI_Type *base, lpspi_slave_handle_t *handle)
LPSPI slave aborts a transfer which uses an interrupt method.
Definition: fsl_lpspi.c:1969
_lpspi_flags
LPSPI status flags in SPIx_SR register.
Definition: fsl_lpspi.h:53
_lpspi_clock_polarity
LPSPI clock polarity configuration.
Definition: fsl_lpspi.h:126
void LPSPI_MasterTransferCreateHandle(LPSPI_Type *base, lpspi_master_handle_t *handle, lpspi_master_transfer_callback_t callback, void *userData)
Initializes the LPSPI master handle.
Definition: fsl_lpspi.c:804
_lpspi_clock_phase
LPSPI clock phase configuration.
Definition: fsl_lpspi.h:133
void LPSPI_Deinit(LPSPI_Type *base)
De-initializes the LPSPI peripheral. Call this API to disable the LPSPI clock.
Definition: fsl_lpspi.c:443
enum _lpspi_shift_direction lpspi_shift_direction_t
LPSPI data shifter direction options.
bool LPSPI_CheckTransferArgument(LPSPI_Type *base, lpspi_transfer_t *transfer, bool isEdma)
Check the argument for transfer .
Definition: fsl_lpspi.c:831
_lpspi_transfer_config_flag_for_slave
Use this enumeration for LPSPI slave transfer configFlags.
Definition: fsl_lpspi.h:231
void LPSPI_MasterTransferAbort(LPSPI_Type *base, lpspi_master_handle_t *handle)
LPSPI master abort transfer which uses an interrupt method.
Definition: fsl_lpspi.c:1536
void LPSPI_MasterGetDefaultConfig(lpspi_master_config_t *masterConfig)
Sets the lpspi_master_config_t structure to default values.
Definition: fsl_lpspi.c:323
_lpspi_dma_enable
LPSPI DMA source.
Definition: fsl_lpspi.h:86
struct _lpspi_transfer lpspi_transfer_t
LPSPI master/slave transfer structure.
status_t LPSPI_MasterTransferGetCount(LPSPI_Type *base, lpspi_master_handle_t *handle, size_t *count)
Gets the master transfer remaining bytes.
Definition: fsl_lpspi.c:1496
@ kLPSPI_SingleBitXfer
Definition: fsl_lpspi.h:185
@ kLPSPI_FourBitXfer
Definition: fsl_lpspi.h:187
@ kLPSPI_TwoBitXfer
Definition: fsl_lpspi.h:186
@ kLPSI_AnyWordAndM1EqualsM0andM1
Definition: fsl_lpspi.h:163
@ kLPSI_MatchDisabled
Definition: fsl_lpspi.h:157
@ kLPSI_1stWordEqualsM0and2ndWordEqualsM1
Definition: fsl_lpspi.h:160
@ kLPSI_1stWordEqualsM0orM1
Definition: fsl_lpspi.h:158
@ kLPSI_1stWordAndM1EqualsM0andM1
Definition: fsl_lpspi.h:162
@ kLPSI_AnyWordEqualsM0andNxtWordEqualsM1
Definition: fsl_lpspi.h:161
@ kLPSI_AnyWordEqualsM0orM1
Definition: fsl_lpspi.h:159
@ kLPSPI_Master
Definition: fsl_lpspi.h:94
@ kLPSPI_Slave
Definition: fsl_lpspi.h:95
@ kLPSPI_Pcs0ActiveLow
Definition: fsl_lpspi.h:117
@ kLPSPI_Pcs2ActiveLow
Definition: fsl_lpspi.h:119
@ kLPSPI_PcsAllActiveLow
Definition: fsl_lpspi.h:121
@ kLPSPI_Pcs3ActiveLow
Definition: fsl_lpspi.h:120
@ kLPSPI_Pcs1ActiveLow
Definition: fsl_lpspi.h:118
@ kLPSPI_Busy
Definition: fsl_lpspi.h:256
@ kLPSPI_Error
Definition: fsl_lpspi.h:257
@ kLPSPI_Idle
Definition: fsl_lpspi.h:255
@ kLPSPI_SdiInSdiOut
Definition: fsl_lpspi.h:170
@ kLPSPI_SdiInSdoOut
Definition: fsl_lpspi.h:169
@ kLPSPI_SdoInSdoOut
Definition: fsl_lpspi.h:171
@ kLPSPI_SdoInSdiOut
Definition: fsl_lpspi.h:172
@ kLPSPI_MasterPcs1
Definition: fsl_lpspi.h:205
@ kLPSPI_MasterPcs3
Definition: fsl_lpspi.h:207
@ kLPSPI_MasterPcsContinuous
Definition: fsl_lpspi.h:209
@ kLPSPI_MasterByteSwap
Definition: fsl_lpspi.h:211
@ kLPSPI_MasterPcs2
Definition: fsl_lpspi.h:206
@ kLPSPI_MasterPcs0
Definition: fsl_lpspi.h:204
@ kLPSPI_PcsActiveLow
Definition: fsl_lpspi.h:111
@ kLPSPI_PcsActiveHigh
Definition: fsl_lpspi.h:110
@ kLPSPI_HostReqExtPin
Definition: fsl_lpspi.h:150
@ kLPSPI_HostReqInternalTrigger
Definition: fsl_lpspi.h:151
@ kLPSPI_ReceiveErrorInterruptEnable
Definition: fsl_lpspi.h:77
@ kLPSPI_FrameCompleteInterruptEnable
Definition: fsl_lpspi.h:74
@ kLPSPI_TransmitErrorInterruptEnable
Definition: fsl_lpspi.h:76
@ kLPSPI_AllInterruptEnable
Definition: fsl_lpspi.h:79
@ kLPSPI_RxInterruptEnable
Definition: fsl_lpspi.h:72
@ kLPSPI_TxInterruptEnable
Definition: fsl_lpspi.h:71
@ kLPSPI_DataMatchInterruptEnable
Definition: fsl_lpspi.h:78
@ kLPSPI_WordCompleteInterruptEnable
Definition: fsl_lpspi.h:73
@ kLPSPI_TransferCompleteInterruptEnable
Definition: fsl_lpspi.h:75
@ kLPSPI_MsbFirst
Definition: fsl_lpspi.h:143
@ kLPSPI_LsbFirst
Definition: fsl_lpspi.h:144
@ kLpspiDataOutRetained
Definition: fsl_lpspi.h:178
@ kLpspiDataOutTristate
Definition: fsl_lpspi.h:179
@ kLPSPI_Pcs1
Definition: fsl_lpspi.h:102
@ kLPSPI_Pcs2
Definition: fsl_lpspi.h:103
@ kLPSPI_Pcs3
Definition: fsl_lpspi.h:104
@ kLPSPI_Pcs0
Definition: fsl_lpspi.h:101
@ kLPSPI_PcsToSck
Definition: fsl_lpspi.h:193
@ kLPSPI_LastSckToPcs
Definition: fsl_lpspi.h:194
@ kLPSPI_BetweenTransfer
Definition: fsl_lpspi.h:195
@ kStatus_LPSPI_Timeout
Definition: fsl_lpspi.h:48
@ kStatus_LPSPI_OutOfRange
Definition: fsl_lpspi.h:47
@ kStatus_LPSPI_Error
Definition: fsl_lpspi.h:45
@ kStatus_LPSPI_Idle
Definition: fsl_lpspi.h:46
@ kStatus_LPSPI_Busy
Definition: fsl_lpspi.h:44
@ kLPSPI_TransmitErrorFlag
Definition: fsl_lpspi.h:59
@ kLPSPI_TxDataRequestFlag
Definition: fsl_lpspi.h:54
@ kLPSPI_TransferCompleteFlag
Definition: fsl_lpspi.h:58
@ kLPSPI_DataMatchFlag
Definition: fsl_lpspi.h:61
@ kLPSPI_RxDataReadyFlag
Definition: fsl_lpspi.h:55
@ kLPSPI_ModuleBusyFlag
Definition: fsl_lpspi.h:62
@ kLPSPI_ReceiveErrorFlag
Definition: fsl_lpspi.h:60
@ kLPSPI_FrameCompleteFlag
Definition: fsl_lpspi.h:57
@ kLPSPI_WordCompleteFlag
Definition: fsl_lpspi.h:56
@ kLPSPI_AllStatusFlag
Definition: fsl_lpspi.h:63
@ kLPSPI_ClockPolarityActiveHigh
Definition: fsl_lpspi.h:127
@ kLPSPI_ClockPolarityActiveLow
Definition: fsl_lpspi.h:128
@ kLPSPI_ClockPhaseFirstEdge
Definition: fsl_lpspi.h:134
@ kLPSPI_ClockPhaseSecondEdge
Definition: fsl_lpspi.h:136
@ kLPSPI_SlavePcs1
Definition: fsl_lpspi.h:233
@ kLPSPI_SlaveByteSwap
Definition: fsl_lpspi.h:237
@ kLPSPI_SlavePcs3
Definition: fsl_lpspi.h:235
@ kLPSPI_SlavePcs0
Definition: fsl_lpspi.h:232
@ kLPSPI_SlavePcs2
Definition: fsl_lpspi.h:234
@ kLPSPI_TxDmaEnable
Definition: fsl_lpspi.h:87
@ kLPSPI_RxDmaEnable
Definition: fsl_lpspi.h:88
Definition: MIMXRT1052.h:30457
LPSPI master configuration structure.
Definition: fsl_lpspi.h:262
lpspi_pcs_polarity_config_t pcsActiveHighOrLow
Definition: fsl_lpspi.h:277
lpspi_shift_direction_t direction
Definition: fsl_lpspi.h:267
lpspi_data_out_config_t dataOutConfig
Definition: fsl_lpspi.h:282
bool enableInputDelay
Definition: fsl_lpspi.h:284
uint32_t baudRate
Definition: fsl_lpspi.h:263
lpspi_clock_phase_t cpha
Definition: fsl_lpspi.h:266
uint32_t betweenTransferDelayInNanoSec
Definition: fsl_lpspi.h:273
uint32_t bitsPerFrame
Definition: fsl_lpspi.h:264
uint32_t lastSckToPcsDelayInNanoSec
Definition: fsl_lpspi.h:271
lpspi_which_pcs_t whichPcs
Definition: fsl_lpspi.h:276
uint32_t pcsToSckDelayInNanoSec
Definition: fsl_lpspi.h:269
lpspi_clock_polarity_t cpol
Definition: fsl_lpspi.h:265
lpspi_pin_config_t pinCfg
Definition: fsl_lpspi.h:279
LPSPI master transfer handle structure used for transactional API.
Definition: fsl_lpspi.h:356
uint8_t *volatile txData
Definition: fsl_lpspi.h:371
volatile uint8_t fifoSize
Definition: fsl_lpspi.h:364
uint8_t *volatile rxData
Definition: fsl_lpspi.h:372
volatile uint8_t state
Definition: fsl_lpspi.h:383
volatile uint32_t writeRegRemainingTimes
Definition: fsl_lpspi.h:376
volatile uint8_t bytesEachRead
Definition: fsl_lpspi.h:369
volatile uint8_t rxWatermark
Definition: fsl_lpspi.h:366
lpspi_master_transfer_callback_t callback
Definition: fsl_lpspi.h:385
volatile uint32_t readRegRemainingTimes
Definition: fsl_lpspi.h:377
volatile size_t txRemainingByteCount
Definition: fsl_lpspi.h:373
volatile bool isTxMask
Definition: fsl_lpspi.h:361
volatile uint16_t bytesPerFrame
Definition: fsl_lpspi.h:362
void * userData
Definition: fsl_lpspi.h:386
uint32_t txBuffIfNull
Definition: fsl_lpspi.h:381
volatile bool writeTcrInIsr
Definition: fsl_lpspi.h:358
volatile uint8_t bytesEachWrite
Definition: fsl_lpspi.h:368
volatile bool isByteSwap
Definition: fsl_lpspi.h:360
uint32_t totalByteCount
Definition: fsl_lpspi.h:379
volatile size_t rxRemainingByteCount
Definition: fsl_lpspi.h:374
volatile bool isPcsContinuous
Definition: fsl_lpspi.h:357
LPSPI slave configuration structure.
Definition: fsl_lpspi.h:290
lpspi_clock_phase_t cpha
Definition: fsl_lpspi.h:293
lpspi_shift_direction_t direction
Definition: fsl_lpspi.h:294
lpspi_pcs_polarity_config_t pcsActiveHighOrLow
Definition: fsl_lpspi.h:297
lpspi_data_out_config_t dataOutConfig
Definition: fsl_lpspi.h:302
uint32_t bitsPerFrame
Definition: fsl_lpspi.h:291
lpspi_clock_polarity_t cpol
Definition: fsl_lpspi.h:292
lpspi_which_pcs_t whichPcs
Definition: fsl_lpspi.h:296
lpspi_pin_config_t pinCfg
Definition: fsl_lpspi.h:299
LPSPI slave transfer handle structure used for transactional API.
Definition: fsl_lpspi.h:391
volatile uint8_t state
Definition: fsl_lpspi.h:412
volatile size_t txRemainingByteCount
Definition: fsl_lpspi.h:404
volatile uint8_t rxWatermark
Definition: fsl_lpspi.h:396
uint8_t *volatile rxData
Definition: fsl_lpspi.h:402
void * userData
Definition: fsl_lpspi.h:417
volatile size_t rxRemainingByteCount
Definition: fsl_lpspi.h:405
volatile uint8_t fifoSize
Definition: fsl_lpspi.h:394
volatile uint8_t bytesEachRead
Definition: fsl_lpspi.h:399
volatile uint32_t errorCount
Definition: fsl_lpspi.h:414
volatile uint32_t readRegRemainingTimes
Definition: fsl_lpspi.h:408
volatile uint8_t bytesEachWrite
Definition: fsl_lpspi.h:398
uint8_t *volatile txData
Definition: fsl_lpspi.h:401
uint32_t totalByteCount
Definition: fsl_lpspi.h:410
volatile bool isByteSwap
Definition: fsl_lpspi.h:392
volatile uint32_t writeRegRemainingTimes
Definition: fsl_lpspi.h:407
lpspi_slave_transfer_callback_t callback
Definition: fsl_lpspi.h:416
LPSPI master/slave transfer structure.
Definition: fsl_lpspi.h:344
uint8_t * rxData
Definition: fsl_lpspi.h:346
uint32_t configFlags
Definition: fsl_lpspi.h:349
volatile size_t dataSize
Definition: fsl_lpspi.h:347
uint8_t * txData
Definition: fsl_lpspi.h:345