diff options
Diffstat (limited to 'cores/arduino/USBCore.cpp')
-rw-r--r-- | cores/arduino/USBCore.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cores/arduino/USBCore.cpp b/cores/arduino/USBCore.cpp index 8bcf66c..dfc0f21 100644 --- a/cores/arduino/USBCore.cpp +++ b/cores/arduino/USBCore.cpp @@ -53,6 +53,10 @@ const u16 STRING_IPRODUCT[17] = { (3<<8) | (2+2*16), #if USB_PID == 0x8036 'A','r','d','u','i','n','o',' ','L','e','o','n','a','r','d','o' +#elif USB_PID == 0x8037 + 'A','r','d','u','i','n','o',' ','M','i','c','r','o',' ',' ',' ' +#elif USB_PID == 0x9208 + 'L','i','l','y','P','a','d','U','S','B',' ',' ',' ',' ',' ',' ' #else 'U','S','B',' ','I','O',' ','B','o','a','r','d',' ',' ',' ',' ' #endif @@ -62,6 +66,8 @@ const u16 STRING_IMANUFACTURER[12] = { (3<<8) | (2+2*11), #if USB_VID == 0x2341 'A','r','d','u','i','n','o',' ','L','L','C' +#elif USB_VID == 0x1b4f + 'S','p','a','r','k','F','u','n',' ',' ',' ' #else 'U','n','k','n','o','w','n',' ',' ',' ',' ' #endif @@ -638,7 +644,11 @@ void USBDevice_::attach() _usbConfiguration = 0; UHWCON = 0x01; // power internal reg USBCON = (1<<USBE)|(1<<FRZCLK); // clock frozen, usb enabled +#if F_CPU == 16000000UL PLLCSR = 0x12; // Need 16 MHz xtal +#elif F_CPU == 8000000UL + PLLCSR = 0x02; // Need 8 MHz xtal +#endif while (!(PLLCSR & (1<<PLOCK))) // wait for lock pll ; |