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) if (r > 0)
{ {
USBD_Flush(CDC_TX);
return r; return r;
} else } else
{ {

View File

@ -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

View File

@ -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);
} }