/* We cannot write directly to the UART, so queue the character.
Block for a maximum of xBlockTime if there is no space in the
queue. It is ok to block within a critical section as each
task has it’s own critical section management. */
xReturn = xQueueSend( xTxChars_u1, &cOutChar, xBlockTime );
/* Depending on queue sizing and task prioritisation: While we
were blocked waiting to post interrupts were not disabled. It is
possible that the serial ISR has emptied the Tx queue, in which
case we need to start the Tx off again. */
if( lTHREEmpty1 == ( portLONG ) pdTRUE )
xQueueReceive( xTxChars_u1, &cOutChar, serNO_BLOCK );
lTHREEmpty1 = pdFALSE;
U1THR = cOutChar;
when posted a char to the uart , we think the uart is busy.
then we post the next char to a queue, then the task blocks, from a critical section?
isn’t the isr been disabled now?then how could the uart continue to transmit till the lTHREEmpty becomes true again?could it be safe if we set xBlockTime to 0?
Need know some detail about this, thank you!