Home
last modified time | relevance | path

Searched refs:transfer (Results 1 – 25 of 58) sorted by relevance

123

/hal_nxp-2.7.6/mcux/drivers/imxrt6xx/
Dfsl_i2c.c976 struct _i2c_master_transfer *transfer; in I2C_InitTransferStateMachine() local
978 handle->transfer = *xfer; in I2C_InitTransferStateMachine()
979 transfer = &(handle->transfer); in I2C_InitTransferStateMachine()
982 handle->remainingBytes = transfer->dataSize; in I2C_InitTransferStateMachine()
983 handle->buf = (uint8_t *)transfer->data; in I2C_InitTransferStateMachine()
987 if ((transfer->flags & (uint32_t)kI2C_TransferNoStartFlag) != 0U) in I2C_InitTransferStateMachine()
990 if (transfer->dataSize == 0U) in I2C_InitTransferStateMachine()
994 else if (handle->transfer.direction == kI2C_Write) in I2C_InitTransferStateMachine()
998 else if (handle->transfer.direction == kI2C_Read) in I2C_InitTransferStateMachine()
1009 if (transfer->subaddressSize != 0U) in I2C_InitTransferStateMachine()
[all …]
Dfsl_i2s_dma.c62 … status_t I2S_EnqueueUserBuffer(I2S_Type *base, i2s_dma_handle_t *handle, i2s_transfer_t transfer);
68 static uint16_t I2S_GetTransferBytes(volatile i2s_transfer_t *transfer);
100 …c status_t I2S_EnqueueUserBuffer(I2S_Type *base, i2s_dma_handle_t *handle, i2s_transfer_t transfer) in I2S_EnqueueUserBuffer() argument
113 assert((((uint32_t)transfer.data) % 4U) == 0U); in I2S_EnqueueUserBuffer()
114 if ((((uint32_t)transfer.data) % 4U) != 0U) in I2S_EnqueueUserBuffer()
120 assert(transfer.dataSize != 0U); in I2S_EnqueueUserBuffer()
121 if (transfer.dataSize == 0U) in I2S_EnqueueUserBuffer()
127 assert((transfer.dataSize % 4U) == 0U); in I2S_EnqueueUserBuffer()
128 if ((transfer.dataSize % 4U) != 0U) in I2S_EnqueueUserBuffer()
141 privateHandle->descriptorQueue[handle->queueUser].data = transfer.data; in I2S_EnqueueUserBuffer()
[all …]
Dfsl_i2c_dma.c89 struct _i2c_master_transfer *transfer; in I2C_InitTransferStateMachineDMA() local
91 handle->transfer = *xfer; in I2C_InitTransferStateMachineDMA()
92 transfer = &(handle->transfer); in I2C_InitTransferStateMachineDMA()
96 handle->buf = (uint8_t *)transfer->data; in I2C_InitTransferStateMachineDMA()
99 if ((transfer->flags & (uint32_t)kI2C_TransferNoStartFlag) != 0U) in I2C_InitTransferStateMachineDMA()
103 if (transfer->dataSize == 0U) in I2C_InitTransferStateMachineDMA()
107 else if (handle->transfer.direction == kI2C_Write) in I2C_InitTransferStateMachineDMA()
111 else if (handle->transfer.direction == kI2C_Read) in I2C_InitTransferStateMachineDMA()
122 if (transfer->subaddressSize != 0U) in I2C_InitTransferStateMachineDMA()
127 if (transfer->subaddressSize > sizeof(handle->subaddrBuf)) in I2C_InitTransferStateMachineDMA()
[all …]
Dfsl_i2s.c47 static status_t I2S_ValidateBuffer(i2s_handle_t *handle, i2s_transfer_t *transfer);
376 static status_t I2S_ValidateBuffer(i2s_handle_t *handle, i2s_transfer_t *transfer) in I2S_ValidateBuffer() argument
378 assert(transfer->data != NULL); in I2S_ValidateBuffer()
380 if (transfer->data == NULL) in I2S_ValidateBuffer()
385 assert(transfer->dataSize > 0U); in I2S_ValidateBuffer()
386 if (transfer->dataSize <= 0U) in I2S_ValidateBuffer()
397 assert((((uint32_t)transfer->data) % 2U) == 0U); in I2S_ValidateBuffer()
398 if ((((uint32_t)transfer->data) % 2U) != 0U) in I2S_ValidateBuffer()
404 assert((transfer->dataSize % 2U) == 0U); in I2S_ValidateBuffer()
405 if ((transfer->dataSize % 2U) != 0U) in I2S_ValidateBuffer()
[all …]
Dfsl_i3c.c1278 status_t I3C_MasterTransferBlocking(I3C_Type *base, i3c_master_transfer_t *transfer) in I3C_MasterTransferBlocking() argument
1280 assert(NULL != transfer); in I3C_MasterTransferBlocking()
1281 assert(transfer->subaddressSize <= sizeof(transfer->subaddress)); in I3C_MasterTransferBlocking()
1284 i3c_direction_t direction = transfer->direction; in I3C_MasterTransferBlocking()
1289 …checkDdrState = (transfer->busType == kI3C_TypeI3CDdr) ? (masterState != kI3C_MasterStateDdr) : tr… in I3C_MasterTransferBlocking()
1304 if (transfer->busType != kI3C_TypeI3CDdr) in I3C_MasterTransferBlocking()
1306 direction = (0UL != transfer->subaddressSize) ? kI3C_Write : transfer->direction; in I3C_MasterTransferBlocking()
1309 if (0UL == (transfer->flags & (uint32_t)kI3C_TransferNoStartFlag)) in I3C_MasterTransferBlocking()
1311 result = I3C_MasterStart(base, transfer->busType, transfer->slaveAddress, direction); in I3C_MasterTransferBlocking()
1332 if (0U != transfer->subaddressSize) in I3C_MasterTransferBlocking()
[all …]
/hal_nxp-2.7.6/mcux/drivers/lpc/
Dfsl_i2c.c976 struct _i2c_master_transfer *transfer; in I2C_InitTransferStateMachine() local
978 handle->transfer = *xfer; in I2C_InitTransferStateMachine()
979 transfer = &(handle->transfer); in I2C_InitTransferStateMachine()
982 handle->remainingBytes = transfer->dataSize; in I2C_InitTransferStateMachine()
983 handle->buf = (uint8_t *)transfer->data; in I2C_InitTransferStateMachine()
987 if ((transfer->flags & (uint32_t)kI2C_TransferNoStartFlag) != 0U) in I2C_InitTransferStateMachine()
990 if (transfer->dataSize == 0U) in I2C_InitTransferStateMachine()
994 else if (handle->transfer.direction == kI2C_Write) in I2C_InitTransferStateMachine()
998 else if (handle->transfer.direction == kI2C_Read) in I2C_InitTransferStateMachine()
1009 if (transfer->subaddressSize != 0U) in I2C_InitTransferStateMachine()
[all …]
Dfsl_i2s_dma.c62 … status_t I2S_EnqueueUserBuffer(I2S_Type *base, i2s_dma_handle_t *handle, i2s_transfer_t transfer);
68 static uint16_t I2S_GetTransferBytes(volatile i2s_transfer_t *transfer);
100 …c status_t I2S_EnqueueUserBuffer(I2S_Type *base, i2s_dma_handle_t *handle, i2s_transfer_t transfer) in I2S_EnqueueUserBuffer() argument
113 assert((((uint32_t)transfer.data) % 4U) == 0U); in I2S_EnqueueUserBuffer()
114 if ((((uint32_t)transfer.data) % 4U) != 0U) in I2S_EnqueueUserBuffer()
120 assert(transfer.dataSize != 0U); in I2S_EnqueueUserBuffer()
121 if (transfer.dataSize == 0U) in I2S_EnqueueUserBuffer()
127 assert((transfer.dataSize % 4U) == 0U); in I2S_EnqueueUserBuffer()
128 if ((transfer.dataSize % 4U) != 0U) in I2S_EnqueueUserBuffer()
141 privateHandle->descriptorQueue[handle->queueUser].data = transfer.data; in I2S_EnqueueUserBuffer()
[all …]
Dfsl_i2c_dma.c89 struct _i2c_master_transfer *transfer; in I2C_InitTransferStateMachineDMA() local
91 handle->transfer = *xfer; in I2C_InitTransferStateMachineDMA()
92 transfer = &(handle->transfer); in I2C_InitTransferStateMachineDMA()
96 handle->buf = (uint8_t *)transfer->data; in I2C_InitTransferStateMachineDMA()
99 if ((transfer->flags & (uint32_t)kI2C_TransferNoStartFlag) != 0U) in I2C_InitTransferStateMachineDMA()
103 if (transfer->dataSize == 0U) in I2C_InitTransferStateMachineDMA()
107 else if (handle->transfer.direction == kI2C_Write) in I2C_InitTransferStateMachineDMA()
111 else if (handle->transfer.direction == kI2C_Read) in I2C_InitTransferStateMachineDMA()
122 if (transfer->subaddressSize != 0U) in I2C_InitTransferStateMachineDMA()
127 if (transfer->subaddressSize > sizeof(handle->subaddrBuf)) in I2C_InitTransferStateMachineDMA()
[all …]
Dfsl_i2s.c47 static status_t I2S_ValidateBuffer(i2s_handle_t *handle, i2s_transfer_t *transfer);
376 static status_t I2S_ValidateBuffer(i2s_handle_t *handle, i2s_transfer_t *transfer) in I2S_ValidateBuffer() argument
378 assert(transfer->data != NULL); in I2S_ValidateBuffer()
380 if (transfer->data == NULL) in I2S_ValidateBuffer()
385 assert(transfer->dataSize > 0U); in I2S_ValidateBuffer()
386 if (transfer->dataSize <= 0U) in I2S_ValidateBuffer()
397 assert((((uint32_t)transfer->data) % 2U) == 0U); in I2S_ValidateBuffer()
398 if ((((uint32_t)transfer->data) % 2U) != 0U) in I2S_ValidateBuffer()
404 assert((transfer->dataSize % 2U) == 0U); in I2S_ValidateBuffer()
405 if ((transfer->dataSize % 2U) != 0U) in I2S_ValidateBuffer()
[all …]
/hal_nxp-2.7.6/mcux/drivers/kinetis/
Dfsl_i2c_dma.c135 if (!(i2cPrivateHandle->handle->transfer.flags & kI2C_TransferNoStopFlag)) in I2C_MasterTransferCallbackDMA()
137 if (i2cPrivateHandle->handle->transfer.direction == kI2C_Read) in I2C_MasterTransferCallbackDMA()
151 … *(i2cPrivateHandle->handle->transfer.data + i2cPrivateHandle->handle->transfer.dataSize - 1) = in I2C_MasterTransferCallbackDMA()
167 if (i2cPrivateHandle->handle->transfer.direction == kI2C_Read) in I2C_MasterTransferCallbackDMA()
181 … *(i2cPrivateHandle->handle->transfer.data + i2cPrivateHandle->handle->transfer.dataSize - 1) = in I2C_MasterTransferCallbackDMA()
236 handle->transfer = *xfer; in I2C_InitTransferStateMachineDMA()
253 if (handle->transfer.flags & kI2C_TransferRepeatedStartFlag) in I2C_InitTransferStateMachineDMA()
255 result = I2C_MasterRepeatedStart(base, handle->transfer.slaveAddress, direction); in I2C_InitTransferStateMachineDMA()
259 result = I2C_MasterStart(base, handle->transfer.slaveAddress, direction); in I2C_InitTransferStateMachineDMA()
296 if (handle->transfer.subaddressSize) in I2C_InitTransferStateMachineDMA()
[all …]
Dfsl_i2c_edma.c99 if (0U == (i2cPrivateHandle->handle->transfer.flags & (uint32_t)kI2C_TransferNoStopFlag)) in I2C_MasterTransferCallbackEDMA()
101 if (i2cPrivateHandle->handle->transfer.direction == kI2C_Read) in I2C_MasterTransferCallbackEDMA()
116 …ze = i2cPrivateHandle->handle->transfer.dataSize; in I2C_MasterTransferCallbackEDMA()
117 *(i2cPrivateHandle->handle->transfer.data + tmpdataSize - 1U) = tmpReg; in I2C_MasterTransferCallbackEDMA()
132 if (i2cPrivateHandle->handle->transfer.direction == kI2C_Read) in I2C_MasterTransferCallbackEDMA()
147 …ze = i2cPrivateHandle->handle->transfer.dataSize; in I2C_MasterTransferCallbackEDMA()
148 *(i2cPrivateHandle->handle->transfer.data + tmpdataSize - 1U) = tmpReg; in I2C_MasterTransferCallbackEDMA()
203 handle->transfer = *xfer; in I2C_InitTransferStateMachineEDMA()
220 if (0U != (handle->transfer.flags & (uint32_t)kI2C_TransferRepeatedStartFlag)) in I2C_InitTransferStateMachineEDMA()
222 result = I2C_MasterRepeatedStart(base, handle->transfer.slaveAddress, direction); in I2C_InitTransferStateMachineEDMA()
[all …]
Dfsl_flexio_i2c_master.c88 handle->transfer.slaveAddress = xfer->slaveAddress; in FLEXIO_I2C_MasterTransferInitStateMachine()
89 handle->transfer.direction = xfer->direction; in FLEXIO_I2C_MasterTransferInitStateMachine()
90 handle->transfer.subaddress = xfer->subaddress; in FLEXIO_I2C_MasterTransferInitStateMachine()
91 handle->transfer.subaddressSize = xfer->subaddressSize; in FLEXIO_I2C_MasterTransferInitStateMachine()
92 handle->transfer.data = xfer->data; in FLEXIO_I2C_MasterTransferInitStateMachine()
93 handle->transfer.dataSize = xfer->dataSize; in FLEXIO_I2C_MasterTransferInitStateMachine()
94 handle->transfer.flags = xfer->flags; in FLEXIO_I2C_MasterTransferInitStateMachine()
104 …needRestart = (handle->transfer.subaddressSize != 0U) && (handle->transfer.direction == kF… in FLEXIO_I2C_MasterTransferInitStateMachine()
112 byteCount += handle->transfer.dataSize; in FLEXIO_I2C_MasterTransferInitStateMachine()
115 if (handle->transfer.subaddressSize != 0U) in FLEXIO_I2C_MasterTransferInitStateMachine()
[all …]
Dfsl_i2c.c237 handle->transfer = *xfer; in I2C_InitTransferStateMachine()
243 if (handle->transfer.subaddressSize > 0u) in I2C_InitTransferStateMachine()
257 if (0U != (handle->transfer.flags & (uint32_t)kI2C_TransferNoStartFlag)) in I2C_InitTransferStateMachine()
260 if (handle->transfer.subaddressSize > 0u) in I2C_InitTransferStateMachine()
297 else if (0U != (handle->transfer.flags & (uint32_t)kI2C_TransferRepeatedStartFlag)) in I2C_InitTransferStateMachine()
299 result = I2C_MasterRepeatedStart(base, handle->transfer.slaveAddress, direction); in I2C_InitTransferStateMachine()
303 result = I2C_MasterStart(base, handle->transfer.slaveAddress, direction); in I2C_InitTransferStateMachine()
338 uint32_t tmpDataSize = handle->transfer.dataSize; in I2C_MasterTransferRunStateMachine()
362 if (handle->transfer.subaddressSize > 0U) in I2C_MasterTransferRunStateMachine()
368 if (handle->transfer.direction == kI2C_Write) in I2C_MasterTransferRunStateMachine()
[all …]
Dfsl_lpi2c_edma.c150 lpi2c_master_transfer_t *xfer = &handle->transfer; in LPI2C_GenerateCommands()
219 lpi2c_master_transfer_t *transfer) in LPI2C_MasterTransferEDMA() argument
224 assert(transfer); in LPI2C_MasterTransferEDMA()
225 assert(transfer->subaddressSize <= sizeof(transfer->subaddress)); in LPI2C_MasterTransferEDMA()
251 handle->transfer = *transfer; in LPI2C_MasterTransferEDMA()
257 if ((0U == commandCount) && (transfer->dataSize == 0U)) in LPI2C_MasterTransferEDMA()
276 bool hasSendData = (transfer->direction == kLPI2C_Write) && (transfer->dataSize != 0U); in LPI2C_MasterTransferEDMA()
277 bool hasReceiveData = (transfer->direction == kLPI2C_Read) && (transfer->dataSize != 0U); in LPI2C_MasterTransferEDMA()
285 uint32_t *srcAddr = (uint32_t *)transfer->data; in LPI2C_MasterTransferEDMA()
293 transferConfig.majorLoopCounts = transfer->dataSize; in LPI2C_MasterTransferEDMA()
[all …]
Dfsl_lpspi_edma.c192 …asterTransferEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *handle, lpspi_transfer_t *transfer) in LPSPI_MasterTransferEDMA() argument
195 assert(transfer); in LPSPI_MasterTransferEDMA()
203 if (!LPSPI_CheckTransferArgument(transfer, bitsPerFrame, bytesPerFrame)) in LPSPI_MasterTransferEDMA()
226 uint32_t whichPcs = (transfer->configFlags & LPSPI_MASTER_PCS_MASK) >> LPSPI_MASTER_PCS_SHIFT; in LPSPI_MasterTransferEDMA()
247 handle->txData = transfer->txData; in LPSPI_MasterTransferEDMA()
248 handle->rxData = transfer->rxData; in LPSPI_MasterTransferEDMA()
249 handle->txRemainingByteCount = transfer->dataSize; in LPSPI_MasterTransferEDMA()
250 handle->rxRemainingByteCount = transfer->dataSize; in LPSPI_MasterTransferEDMA()
251 handle->totalByteCount = transfer->dataSize; in LPSPI_MasterTransferEDMA()
253 …handle->writeRegRemainingTimes = (transfer->dataSize / bytesPerFrame) * ((bytesPerFrame + 3U) / 4U… in LPSPI_MasterTransferEDMA()
[all …]
Dfsl_lpspi.c725 bool LPSPI_CheckTransferArgument(lpspi_transfer_t *transfer, uint32_t bitsPerFrame, uint32_t bytesP… in LPSPI_CheckTransferArgument() argument
727 assert(transfer); in LPSPI_CheckTransferArgument()
730 if (transfer->dataSize == 0U) in LPSPI_CheckTransferArgument()
736 if ((NULL == (transfer->txData)) && (NULL == (transfer->rxData))) in LPSPI_CheckTransferArgument()
748 if ((transfer->dataSize % bytesPerFrame) != 0U) in LPSPI_CheckTransferArgument()
757 if (transfer->dataSize != bytesPerFrame) in LPSPI_CheckTransferArgument()
764 if ((transfer->dataSize % bytesPerFrame) != 0U) in LPSPI_CheckTransferArgument()
791 status_t LPSPI_MasterTransferBlocking(LPSPI_Type *base, lpspi_transfer_t *transfer) in LPSPI_MasterTransferBlocking() argument
793 assert(transfer); in LPSPI_MasterTransferBlocking()
800 if (!LPSPI_CheckTransferArgument(transfer, bitsPerFrame, bytesPerFrame)) in LPSPI_MasterTransferBlocking()
[all …]
Dfsl_lpi2c.c854 status_t LPI2C_MasterTransferBlocking(LPI2C_Type *base, lpi2c_master_transfer_t *transfer) in LPI2C_MasterTransferBlocking() argument
860 assert(NULL != transfer); in LPI2C_MasterTransferBlocking()
861 assert(transfer->subaddressSize <= sizeof(transfer->subaddress)); in LPI2C_MasterTransferBlocking()
876 …lpi2c_direction_t direction = (0U != transfer->subaddressSize) ? kLPI2C_Write : transfer->directio… in LPI2C_MasterTransferBlocking()
877 if (0U == (transfer->flags & (uint32_t)kLPI2C_TransferNoStartFlag)) in LPI2C_MasterTransferBlocking()
880 …(uint16_t)kStartCmd | (uint16_t)((uint16_t)((uint16_t)transfer->slaveAddress << 1U) | (uint16_t)di… in LPI2C_MasterTransferBlocking()
884 if (0U != transfer->subaddressSize) in LPI2C_MasterTransferBlocking()
886 uint32_t subaddressRemaining = transfer->subaddressSize; in LPI2C_MasterTransferBlocking()
889 …uint8_t subaddressByte = (uint8_t)((transfer->subaddress >> (8U * subaddressRemaining)) & 0xffU… in LPI2C_MasterTransferBlocking()
895 if ((0U != transfer->dataSize) && (transfer->direction == kLPI2C_Read)) in LPI2C_MasterTransferBlocking()
[all …]
Dfsl_dspi.c82 …SPI_MasterTransferPrepare(SPI_Type *base, dspi_master_handle_t *handle, dspi_transfer_t *transfer);
885 status_t DSPI_MasterTransferBlocking(SPI_Type *base, dspi_transfer_t *transfer) in DSPI_MasterTransferBlocking() argument
887 assert(NULL != transfer); in DSPI_MasterTransferBlocking()
907 if (transfer->dataSize == 0U) in DSPI_MasterTransferBlocking()
919 …(uint8_t)((uint32_t)1U << ((transfer->configFlags & DSPI_MASTER_PCS_MASK) >> DSPI_MASTER_PCS_SHIFT… in DSPI_MasterTransferBlocking()
922 …commandStruct.whichCtar = (uint8_t)((transfer->configFlags & DSPI_MASTER_CTAR_MASK) >> DSPI_MASTER… in DSPI_MasterTransferBlocking()
924 (0U != (transfer->configFlags & (uint32_t)kDSPI_MasterPcsContinuous)) ? true : false; in DSPI_MasterTransferBlocking()
930 (0U != (transfer->configFlags & (uint32_t)kDSPI_MasterActiveAfterTransfer)) ? true : false; in DSPI_MasterTransferBlocking()
936 txData = transfer->txData; in DSPI_MasterTransferBlocking()
937 rxData = transfer->rxData; in DSPI_MasterTransferBlocking()
[all …]
Dfsl_dspi_edma.c137 …PI_MasterTransferEDMA(SPI_Type *base, dspi_master_edma_handle_t *handle, dspi_transfer_t *transfer) in DSPI_MasterTransferEDMA() argument
140 assert(NULL != transfer); in DSPI_MasterTransferEDMA()
143 if (transfer->dataSize == 0U) in DSPI_MasterTransferEDMA()
149 if ((NULL == (transfer->txData)) && (NULL == (transfer->rxData))) in DSPI_MasterTransferEDMA()
186 …(uint8_t)((uint32_t)1U << ((transfer->configFlags & DSPI_MASTER_PCS_MASK) >> DSPI_MASTER_PCS_SHIFT… in DSPI_MasterTransferEDMA()
189 …commandStruct.whichCtar = (uint8_t)((transfer->configFlags & DSPI_MASTER_CTAR_MASK) >> DSPI_MASTER… in DSPI_MasterTransferEDMA()
191 (0U != (transfer->configFlags & (uint32_t)kDSPI_MasterPcsContinuous)) ? true : false; in DSPI_MasterTransferEDMA()
196 (0U != (transfer->configFlags & (uint32_t)kDSPI_MasterActiveAfterTransfer)) ? true : false; in DSPI_MasterTransferEDMA()
210 handle->txData = transfer->txData; in DSPI_MasterTransferEDMA()
211 handle->rxData = transfer->rxData; in DSPI_MasterTransferEDMA()
[all …]
/hal_nxp-2.7.6/mcux/drivers/imx8/
Dfsl_i2c.c183 handle->transfer = *xfer; in I2C_InitTransferStateMachine()
189 if (handle->transfer.subaddressSize > 0U) in I2C_InitTransferStateMachine()
203 if ((handle->transfer.flags & (uint32_t)kI2C_TransferNoStartFlag) != 0U) in I2C_InitTransferStateMachine()
206 if (handle->transfer.subaddressSize > 0U) in I2C_InitTransferStateMachine()
231 else if ((handle->transfer.flags & (uint32_t)kI2C_TransferRepeatedStartFlag) != 0U) in I2C_InitTransferStateMachine()
233 result = I2C_MasterRepeatedStart(base, handle->transfer.slaveAddress, direction); in I2C_InitTransferStateMachine()
237 result = I2C_MasterStart(base, handle->transfer.slaveAddress, direction); in I2C_InitTransferStateMachine()
278 …bool ignoreNak = ((handle->state == (uint8_t)kSendDataState) && (handle->transfer.dataSize… in I2C_MasterTransferRunStateMachine()
279 … ((handle->state == (uint8_t)kReceiveDataState) && (handle->transfer.dataSize == 1U)); in I2C_MasterTransferRunStateMachine()
303 if (handle->transfer.subaddressSize > 0U) in I2C_MasterTransferRunStateMachine()
[all …]
/hal_nxp-2.7.6/mcux/drivers/imx/
Dfsl_flexio_i2c_master.c88 handle->transfer.slaveAddress = xfer->slaveAddress; in FLEXIO_I2C_MasterTransferInitStateMachine()
89 handle->transfer.direction = xfer->direction; in FLEXIO_I2C_MasterTransferInitStateMachine()
90 handle->transfer.subaddress = xfer->subaddress; in FLEXIO_I2C_MasterTransferInitStateMachine()
91 handle->transfer.subaddressSize = xfer->subaddressSize; in FLEXIO_I2C_MasterTransferInitStateMachine()
92 handle->transfer.data = xfer->data; in FLEXIO_I2C_MasterTransferInitStateMachine()
93 handle->transfer.dataSize = xfer->dataSize; in FLEXIO_I2C_MasterTransferInitStateMachine()
94 handle->transfer.flags = xfer->flags; in FLEXIO_I2C_MasterTransferInitStateMachine()
104 …needRestart = (handle->transfer.subaddressSize != 0U) && (handle->transfer.direction == kF… in FLEXIO_I2C_MasterTransferInitStateMachine()
112 byteCount += handle->transfer.dataSize; in FLEXIO_I2C_MasterTransferInitStateMachine()
115 if (handle->transfer.subaddressSize != 0U) in FLEXIO_I2C_MasterTransferInitStateMachine()
[all …]
Dfsl_lpi2c_edma.c149 lpi2c_master_transfer_t *xfer = &handle->transfer; in LPI2C_GenerateCommands()
232 lpi2c_master_transfer_t *transfer) in LPI2C_MasterTransferEDMA() argument
237 assert(transfer != NULL); in LPI2C_MasterTransferEDMA()
238 assert(transfer->subaddressSize <= sizeof(transfer->subaddress)); in LPI2C_MasterTransferEDMA()
245 if ((transfer->direction == kLPI2C_Read) && (transfer->dataSize > (256U * 4U))) in LPI2C_MasterTransferEDMA()
274 handle->transfer = *transfer; in LPI2C_MasterTransferEDMA()
280 if ((0U == commandCount) && (transfer->dataSize == 0U)) in LPI2C_MasterTransferEDMA()
299 bool hasSendData = (transfer->direction == kLPI2C_Write) && (transfer->dataSize != 0U); in LPI2C_MasterTransferEDMA()
300 bool hasReceiveData = (transfer->direction == kLPI2C_Read) && (transfer->dataSize != 0U); in LPI2C_MasterTransferEDMA()
308 uint32_t *srcAddr = (uint32_t *)transfer->data; in LPI2C_MasterTransferEDMA()
[all …]
Dfsl_lpspi_edma.c201 …asterTransferEDMA(LPSPI_Type *base, lpspi_master_edma_handle_t *handle, lpspi_transfer_t *transfer) in LPSPI_MasterTransferEDMA() argument
204 assert(transfer != NULL); in LPSPI_MasterTransferEDMA()
215 if (!LPSPI_CheckTransferArgument(base, transfer, true)) in LPSPI_MasterTransferEDMA()
224 bool isByteSwap = ((transfer->configFlags & (uint32_t)kLPSPI_MasterByteSwap) != 0U); in LPSPI_MasterTransferEDMA()
225 … bool isPcsContinuous = ((transfer->configFlags & (uint32_t)kLPSPI_MasterPcsContinuous) != 0U); in LPSPI_MasterTransferEDMA()
233 …uint32_t whichPcs = (transfer->configFlags & LPSPI_MASTER_PCS_MASK) >> LPSPI_MASTER_PCS_SHIFT; in LPSPI_MasterTransferEDMA()
241 handle->txData = transfer->txData; in LPSPI_MasterTransferEDMA()
242 handle->rxData = transfer->rxData; in LPSPI_MasterTransferEDMA()
243 handle->txRemainingByteCount = transfer->dataSize; in LPSPI_MasterTransferEDMA()
244 handle->rxRemainingByteCount = transfer->dataSize; in LPSPI_MasterTransferEDMA()
[all …]
Dfsl_lpspi.c733 bool LPSPI_CheckTransferArgument(LPSPI_Type *base, lpspi_transfer_t *transfer, bool isEdma) in LPSPI_CheckTransferArgument() argument
735 assert(transfer != NULL); in LPSPI_CheckTransferArgument()
740 if (transfer->dataSize == 0U) in LPSPI_CheckTransferArgument()
746 if ((NULL == (transfer->txData)) && (NULL == (transfer->rxData))) in LPSPI_CheckTransferArgument()
758 if ((transfer->dataSize % bytesPerFrame) != 0U) in LPSPI_CheckTransferArgument()
767 if (transfer->dataSize != bytesPerFrame) in LPSPI_CheckTransferArgument()
774 if ((transfer->dataSize % bytesPerFrame) != 0U) in LPSPI_CheckTransferArgument()
785 if ((transfer->txData != NULL) && (transfer->rxData != NULL)) in LPSPI_CheckTransferArgument()
789 if (NULL == transfer->txData) in LPSPI_CheckTransferArgument()
819 status_t LPSPI_MasterTransferBlocking(LPSPI_Type *base, lpspi_transfer_t *transfer) in LPSPI_MasterTransferBlocking() argument
[all …]
Dfsl_lpi2c.c891 status_t LPI2C_MasterTransferBlocking(LPI2C_Type *base, lpi2c_master_transfer_t *transfer) in LPI2C_MasterTransferBlocking() argument
893 assert(NULL != transfer); in LPI2C_MasterTransferBlocking()
894 assert(transfer->subaddressSize <= sizeof(transfer->subaddress)); in LPI2C_MasterTransferBlocking()
901 …if ((transfer->direction == kLPI2C_Read) && (transfer->dataSize > (256U * FSL_FEATURE_LPI2C_FIFO_S… in LPI2C_MasterTransferBlocking()
916 …lpi2c_direction_t direction = (0U != transfer->subaddressSize) ? kLPI2C_Write : transfer->directio… in LPI2C_MasterTransferBlocking()
917 if (0U == (transfer->flags & (uint32_t)kLPI2C_TransferNoStartFlag)) in LPI2C_MasterTransferBlocking()
921 … (uint16_t)((uint16_t)((uint16_t)transfer->slaveAddress << 1U) | (uint16_t)direction); in LPI2C_MasterTransferBlocking()
925 if (0U != transfer->subaddressSize) in LPI2C_MasterTransferBlocking()
927 uint32_t subaddressRemaining = transfer->subaddressSize; in LPI2C_MasterTransferBlocking()
930 …uint8_t subaddressByte = (uint8_t)((transfer->subaddress >> (8U * subaddressRemaining)) & 0xffU… in LPI2C_MasterTransferBlocking()
[all …]

123