aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino
diff options
context:
space:
mode:
Diffstat (limited to 'cores/arduino')
-rw-r--r--cores/arduino/HardwareSerial.h2
-rw-r--r--cores/arduino/USBCore.cpp10
2 files changed, 11 insertions, 1 deletions
diff --git a/cores/arduino/HardwareSerial.h b/cores/arduino/HardwareSerial.h
index c2d0ce9..2b1de91 100644
--- a/cores/arduino/HardwareSerial.h
+++ b/cores/arduino/HardwareSerial.h
@@ -53,7 +53,7 @@ class HardwareSerial : public Stream
volatile uint8_t *ucsrc, volatile uint8_t *udr,
uint8_t rxen, uint8_t txen, uint8_t rxcie, uint8_t udrie, uint8_t u2x);
void begin(unsigned long);
- void begin(unsigned long, byte);
+ void begin(unsigned long, uint8_t);
void end();
virtual int available(void);
virtual int peek(void);
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
;