Ejemplo n.º 1
0
void empty_sendbuf()
{
	do
	{
		serial_check();
	}
	while (!serial_send_buffer_empty(USB_COMM));
}
Ejemplo n.º 2
0
void rob_wait_serial_send_buffer_empty_usb_comm ()
{
    vTaskSuspendAll();
    {
        while (!serial_send_buffer_empty (USB_COMM))
        {
        }
    }
    xTaskResumeAll();
}
Ejemplo n.º 3
0
void wait_for_sending_to_finish()
{
	int32_t timeout = SERIAL_SEND_TIMEOUT;
	// need to have a timer here that can timeout
	// this helps in the case the serial port is not connected and
	// we could hang here until reset.
	while(!serial_send_buffer_empty(USB_COMM) && ( 0 < timeout-- ) )
	{
		serial_check();		// USB_COMM port is always in SERIAL_CHECK mode
	}
}
Ejemplo n.º 4
0
// wait_for_sending_to_finish:  Waits for the bytes in the send buffer to
// finish transmitting on USB_COMM.  We must call this before modifying
// send_buffer or trying to send more bytes, because otherwise we could
// corrupt an existing transmission.
void wait_for_sending_to_finish()
{
	while(!serial_send_buffer_empty(USB_COMM))
		serial_check();		// USB_COMM port is always in SERIAL_CHECK mode
}