Rev 58 | Rev 61 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 58 | Rev 60 | ||
---|---|---|---|
Line 138... | Line 138... | ||
138 | // copy contents of ToFlightCtrl->SPI_TxBuffer |
138 | // copy contents of ToFlightCtrl->SPI_TxBuffer |
139 | memcpy( (u8 *) &(SPI_TxBuffer[2]), (u8 *) &ToFlightCtrl, sizeof(ToFlightCtrl)); |
139 | memcpy( (u8 *) &(SPI_TxBuffer[2]), (u8 *) &ToFlightCtrl, sizeof(ToFlightCtrl)); |
140 | } |
140 | } |
141 | } |
141 | } |
142 | // while RxFIFO not empty |
142 | // while RxFIFO not empty |
143 | while (SSP_GetFlagStatus(SSP0, SSP_FLAG_RxFifoNotEmpty)==SET) |
143 | while (SSP_GetFlagStatus(SSP0, SSP_FLAG_RxFifoNotEmpty) == SET) |
144 | { |
144 | { |
145 | rxdata = SSP0->DR; // catch the received byte |
145 | rxdata = SSP0->DR; // catch the received byte |
146 | // Fill TxFIFO while its not full or end of packet is reached |
146 | // Fill TxFIFO while its not full or end of packet is reached |
147 | while (SSP_GetFlagStatus(SSP0, SSP_FLAG_TxFifoNotFull) == SET) |
147 | while (SSP_GetFlagStatus(SSP0, SSP_FLAG_TxFifoNotFull) == SET) |
148 | { |
148 | { |