mirror of
https://github.com/arduino/Arduino.git
synced 2024-11-29 10:24:12 +01:00
Fixed USB-CDC buffering. Now serial output performs much better.
This commit is contained in:
parent
5b54b2f945
commit
b7fce4207f
@ -228,7 +228,6 @@ size_t Serial_::write(uint8_t c)
|
||||
|
||||
if (r > 0)
|
||||
{
|
||||
USBD_Flush(CDC_TX);
|
||||
return r;
|
||||
} else
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user