Lines Matching refs:transfer

976     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()
1014 if (transfer->subaddressSize > sizeof(handle->subaddrBuf)) in I2C_InitTransferStateMachine()
1026 handle->remainingSubaddr = transfer->subaddressSize; in I2C_InitTransferStateMachine()
1039 struct _i2c_master_transfer *transfer; in I2C_RunTransferStateMachine() local
1042 transfer = &(handle->transfer); in I2C_RunTransferStateMachine()
1115 base->MSTDAT = (uint32_t)transfer->slaveAddress << 1U; in I2C_RunTransferStateMachine()
1118 else if (transfer->direction == kI2C_Write) in I2C_RunTransferStateMachine()
1120 base->MSTDAT = (uint32_t)transfer->slaveAddress << 1; in I2C_RunTransferStateMachine()
1125 base->MSTDAT = ((uint32_t)transfer->slaveAddress << 1) | 1u; in I2C_RunTransferStateMachine()
1138 … base->MSTDAT = handle->subaddrBuf[handle->transfer.subaddressSize - handle->remainingSubaddr]; in I2C_RunTransferStateMachine()
1149 …handle->state = (transfer->direction == kI2C_Read) ? (uint8_t)kStartState : (uint8_t)kTransmitData… in I2C_RunTransferStateMachine()
1199 if (0U == (transfer->flags & (uint32_t)kI2C_TransferNoStopFlag)) in I2C_RunTransferStateMachine()
1210 if ((transfer->flags & (uint32_t)kI2C_TransferNoStopFlag) != 0U) in I2C_RunTransferStateMachine()
1350 uint32_t eventMask = handle->transfer.eventMask; in I2C_SlaveInvokeEvent()
1351 handle->transfer.event = event; in I2C_SlaveInvokeEvent()
1354 handle->callback(base, &handle->transfer, handle->userData); in I2C_SlaveInvokeEvent()
1356 size_t txSize = handle->transfer.txSize; in I2C_SlaveInvokeEvent()
1357 size_t rxSize = handle->transfer.rxSize; in I2C_SlaveInvokeEvent()
1361 if (((handle->transfer.txData != NULL) && (txSize != 0U)) || in I2C_SlaveInvokeEvent()
1362 ((handle->transfer.rxData != NULL) && (rxSize != 0U))) in I2C_SlaveInvokeEvent()
1371 handle->transfer.transferredCount = 0; in I2C_SlaveInvokeEvent()
1385 handle->transfer.receivedAddress = addressByte0; in I2C_SlaveAddressIRQ()
1390 txSize = handle->transfer.txSize; in I2C_SlaveAddressIRQ()
1392 if ((handle->transfer.txData == NULL) || (txSize == 0U)) in I2C_SlaveAddressIRQ()
1397 txSize = handle->transfer.txSize; in I2C_SlaveAddressIRQ()
1399 if ((handle->transfer.txData == NULL) || (txSize == 0U)) in I2C_SlaveAddressIRQ()
1410 rxSize = handle->transfer.rxSize; in I2C_SlaveAddressIRQ()
1412 if ((handle->transfer.rxData == NULL) || (rxSize == 0U)) in I2C_SlaveAddressIRQ()
1417 rxSize = handle->transfer.rxSize; in I2C_SlaveAddressIRQ()
1419 if ((handle->transfer.rxData == NULL) || (rxSize == 0U)) in I2C_SlaveAddressIRQ()
1458 handle->transfer.txData = (const uint8_t *)txData; in I2C_SlaveTransferNonBlockingInternal()
1459 handle->transfer.txSize = txSize; in I2C_SlaveTransferNonBlockingInternal()
1460 handle->transfer.rxData = (uint8_t *)rxData; in I2C_SlaveTransferNonBlockingInternal()
1461 handle->transfer.rxSize = rxSize; in I2C_SlaveTransferNonBlockingInternal()
1462 handle->transfer.transferredCount = 0; in I2C_SlaveTransferNonBlockingInternal()
1463 …handle->transfer.eventMask = eventMask | (uint32_t)kI2C_SlaveTransmitEvent | (uint32_t)kI2C_SlaveR… in I2C_SlaveTransferNonBlockingInternal()
1503 …I2C_Type *base, volatile i2c_slave_transfer_t *transfer, const void *txData, size_t txSize, uint32… in I2C_SlaveSetSendBuffer() argument
1505 …return I2C_SlaveTransferNonBlockingInternal(base, transfer->handle, txData, txSize, NULL, 0u, even… in I2C_SlaveSetSendBuffer()
1533 …I2C_Type *base, volatile i2c_slave_transfer_t *transfer, void *rxData, size_t rxSize, uint32_t eve… in I2C_SlaveSetReceiveBuffer() argument
1535 …return I2C_SlaveTransferNonBlockingInternal(base, transfer->handle, NULL, 0u, rxData, rxSize, even… in I2C_SlaveSetReceiveBuffer()
1866 handle->transfer.handle = handle; in I2C_SlaveTransferCreateHandle()
1933 *count = handle->transfer.transferredCount; in I2C_SlaveTransferGetCount()
1955 handle->transfer.txSize = 0U; in I2C_SlaveTransferAbort()
1956 handle->transfer.rxSize = 0U; in I2C_SlaveTransferAbort()
2001 rxSize = handle->transfer.rxSize; in I2C_SlaveTransferHandleIRQ()
2003 if ((handle->transfer.rxData == NULL) || (rxSize == 0U)) in I2C_SlaveTransferHandleIRQ()
2008 rxSize = handle->transfer.rxSize; in I2C_SlaveTransferHandleIRQ()
2010 if ((handle->transfer.rxData != NULL) && (rxSize != 0U)) in I2C_SlaveTransferHandleIRQ()
2015 *(handle->transfer.rxData) = tmpdata; in I2C_SlaveTransferHandleIRQ()
2016 (handle->transfer.rxSize)--; in I2C_SlaveTransferHandleIRQ()
2017 (handle->transfer.rxData)++; in I2C_SlaveTransferHandleIRQ()
2018 (handle->transfer.transferredCount)++; in I2C_SlaveTransferHandleIRQ()
2021 rxSize = handle->transfer.rxSize; in I2C_SlaveTransferHandleIRQ()
2022 txSize = handle->transfer.txSize; in I2C_SlaveTransferHandleIRQ()
2044 txSize = handle->transfer.txSize; in I2C_SlaveTransferHandleIRQ()
2046 if ((handle->transfer.txData == NULL) || (txSize == 0U)) in I2C_SlaveTransferHandleIRQ()
2051 txSize = handle->transfer.txSize; in I2C_SlaveTransferHandleIRQ()
2053 if ((handle->transfer.txData != NULL) && (txSize != 0U)) in I2C_SlaveTransferHandleIRQ()
2055 base->SLVDAT = *(handle->transfer.txData); in I2C_SlaveTransferHandleIRQ()
2058 (handle->transfer.txSize)--; in I2C_SlaveTransferHandleIRQ()
2059 (handle->transfer.txData)++; in I2C_SlaveTransferHandleIRQ()
2060 (handle->transfer.transferredCount)++; in I2C_SlaveTransferHandleIRQ()
2063 rxSize = handle->transfer.rxSize; in I2C_SlaveTransferHandleIRQ()
2064 txSize = handle->transfer.txSize; in I2C_SlaveTransferHandleIRQ()