/* Read byte(s) from FIFO buffer */ STATIC void readData(LPC_SPI_T *pSPI, SPI_DATA_SETUP_T *pXfSetup, uint16_t rDat, uint32_t num_bytes) { rDat = Chip_SPI_ReceiveFrame(pSPI); if (pXfSetup->pRxData) { pXfSetup->pRxData[pXfSetup->cnt] = rDat; if (num_bytes == 2) { pXfSetup->pRxData[pXfSetup->cnt + 1] = rDat >> 8; }
STATIC void SPI_Receive_Data(LPC_SPI_T *pSPI, SPI_DATA_SETUP_T *pXfSetup) { pXfSetup->pRx[pXfSetup->RxCnt] = Chip_SPI_ReceiveFrame(pSPI); pXfSetup->RxCnt++; }