1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Fixed USB-CDC buffering. Now serial output performs much better.

This commit is contained in:
Cristian Maglie 2012-08-21 12:50:12 +02:00
parent 5b54b2f945
commit b7fce4207f
4 changed files with 7 additions and 2 deletions

View File

@ -228,7 +228,6 @@ size_t Serial_::write(uint8_t c)
if (r > 0)
{
USBD_Flush(CDC_TX);
return r;
} else
{

View File

@ -397,6 +397,12 @@ static void USB_ISR(void)
udd_ack_fifocon(CDC_RX);
}
if (Is_udd_sof())
{
udd_ack_sof();
USBD_Flush(CDC_TX);
}
#endif
// EP 0 Interrupt

View File

@ -115,7 +115,7 @@ void UDD_Attach(void)
// Enable USB line events
udd_enable_reset_interrupt();
//udd_enable_sof_interrupt();
udd_enable_sof_interrupt();
cpu_irq_restore(flags);
}