usbuart: Don't try to send until configured. Enumeration may hang else
This commit is contained in:
parent
dee82a0d4f
commit
ff8de39774
|
@ -126,6 +126,12 @@ void USBUSART_ISR(void)
|
|||
{
|
||||
char c = usart_recv(USBUSART);
|
||||
|
||||
/* Don't try to write until we are configured.
|
||||
* Otherwise enumeration hanged in some cases.
|
||||
*/
|
||||
if (cdcacm_get_config() != 1)
|
||||
return;
|
||||
|
||||
gpio_set(LED_PORT_UART, LED_UART);
|
||||
|
||||
/* Try to send now */
|
||||
|
|
Loading…
Reference in New Issue