Chip_SSP_Int_FlushData(LPC_SSP); uint16_t ntx_data; ntx_data = (0x6000); // instruction read the CNTR register 0110 0000 0000 0000 Chip_SSP_SendFrame(LPC_SSP, ntx_data); ntx_data = (0x0000); // send nothing to keep the clock going Chip_SSP_SendFrame(LPC_SSP, ntx_data); uint16_t rxedData = Chip_SSP_ReceiveFrame(LPC_SSP); // get first frame uint16_t rxedData2 = Chip_SSP_ReceiveFrame(LPC_SSP); // get second frame |
while (Chip_SSP_GetStatus(LPC_SSP, SSP_STAT_BSY)) {} |