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:
parent
5b54b2f945
commit
b7fce4207f
@ -228,7 +228,6 @@ size_t Serial_::write(uint8_t c)
|
|||||||
|
|
||||||
if (r > 0)
|
if (r > 0)
|
||||||
{
|
{
|
||||||
USBD_Flush(CDC_TX);
|
|
||||||
return r;
|
return r;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
|
@ -397,6 +397,12 @@ static void USB_ISR(void)
|
|||||||
|
|
||||||
udd_ack_fifocon(CDC_RX);
|
udd_ack_fifocon(CDC_RX);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (Is_udd_sof())
|
||||||
|
{
|
||||||
|
udd_ack_sof();
|
||||||
|
USBD_Flush(CDC_TX);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// EP 0 Interrupt
|
// EP 0 Interrupt
|
||||||
|
@ -115,7 +115,7 @@ void UDD_Attach(void)
|
|||||||
|
|
||||||
// Enable USB line events
|
// Enable USB line events
|
||||||
udd_enable_reset_interrupt();
|
udd_enable_reset_interrupt();
|
||||||
//udd_enable_sof_interrupt();
|
udd_enable_sof_interrupt();
|
||||||
|
|
||||||
cpu_irq_restore(flags);
|
cpu_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user