diff options
author | Cristian Maglie <c.maglie@bug.st> | 2012-11-04 22:49:14 +0100 |
---|---|---|
committer | Cristian Maglie <c.maglie@bug.st> | 2012-11-04 22:49:14 +0100 |
commit | 706f5c74b2bfc51e27ab283c4959b998008aeffc (patch) | |
tree | 9e243b4582251be221ce7a4a5ee6609d5960659c /cores/arduino/USBCore.cpp | |
parent | 1408d931fe86a36adc9993823cd06442d85be8e0 (diff) | |
parent | bb6569d0695eef174a190a4c0fd570deb55ecfc2 (diff) |
Merged 1.0.2
Merge remote-tracking branch 'arduino/master' into ide-1.5.x
Conflicts:
app/src/processing/app/debug/AvrdudeUploader.java
build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino
build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino
build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino
build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino
build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino
hardware/arduino/boards.txt
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 ; |