mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-19 09:42:11 +03:00
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
This commit is contained in:
@ -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);
|
||||
|
@ -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
|
||||
;
|
||||
|
||||
|
Reference in New Issue
Block a user