Hi team,
Here is a question about SCI example in driverlib of F28004x.
In the follow line:
while(SCI_getTxFIFOStatus(base) == SCI_FIFO_TX15)
Why the condition is FIFO level == 15 rather than 16 which is full status?
Thanks!
void SCI_writeCharArray(uint32_t base, const uint16_t * const array, uint16_t length) { // // Check the arguments. // ASSERT(SCI_isBaseValid(base)); uint16_t i; // // Check if FIFO enhancement is enabled. // if(SCI_isFIFOEnabled(base)) { // // FIFO is enabled. // For loop to write (Blocking) 'length' number of characters // for(i = 0U; i < length; i++) { // // Wait until space is available in the transmit FIFO. // while(SCI_getTxFIFOStatus(base) == SCI_FIFO_TX15) { } // // Send a char. // HWREGH(base + SCI_O_TXBUF) = array[i]; } }