summaryrefslogtreecommitdiff
path: root/software/avr.lib/anyio.c
diff options
context:
space:
mode:
Diffstat (limited to 'software/avr.lib/anyio.c')
-rw-r--r--software/avr.lib/anyio.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/software/avr.lib/anyio.c b/software/avr.lib/anyio.c
index aaa5f47..6322feb 100644
--- a/software/avr.lib/anyio.c
+++ b/software/avr.lib/anyio.c
@@ -83,10 +83,12 @@ void anyio_init(const uint32_t baudrate, const uint8_t doublespeed)
void anyio_task(void)
{
+#if defined(USB_SERIES_4_AVR) || defined(USB_SERIES_6_AVR) || defined(USB_SERIES_7_AVR)
if(USB_DeviceState == DEVICE_STATE_Unattached && USB_VBUS_GetStatus()) {
USB_Disable();
USB_Init();
}
+#endif
CDC_Device_USBTask(&VirtualSerial_CDC_Interface);
USB_USBTask();