Permalink
Browse files

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
  • Loading branch information...
2 parents d5e7d0d + 056ba5f commit 23c7536dc76f34d72e585cc4edda20ccda1681a2 @cmaglie cmaglie committed Nov 4, 2012
Showing with 3,583 additions and 21 deletions.
  1. +3 −3 build/linux/dist/arduino
  2. +96 −0 build/shared/examples/09.USB/Keyboard/KeyboardLogout/KeyboardLogout.ino
  3. +1 −1 build/shared/examples/09.USB/Keyboard/KeyboardMessage/KeyboardMessage.ino
  4. +1 −1 build/shared/examples/09.USB/Keyboard/KeyboardReprogram/KeyboardReprogram.ino
  5. +3 −3 build/shared/examples/09.USB/Keyboard/KeyboardSerial/KeyboardSerial.ino
  6. +1 −4 build/shared/examples/09.USB/KeyboardAndMouseControl/KeyboardAndMouseControl.ino
  7. +1 −1 build/shared/examples/09.USB/Mouse/ButtonMouseControl/ButtonMouseControl.ino
  8. +1 −3 build/shared/examples/09.USB/Mouse/JoystickMouseControl/JoystickMouseControl.ino
  9. +4 −3 build/windows/dist/drivers/Arduino Micro.inf
  10. +107 −0 build/windows/dist/drivers/LilyPadUSB.inf
  11. +29 −1 hardware/arduino/avr/boards.txt
  12. +259 −0 hardware/arduino/avr/bootloaders/caterina-LilyPadUSB/Caterina-LilyPadUSB.hex
  13. +780 −0 hardware/arduino/avr/bootloaders/caterina-LilyPadUSB/Caterina.c
  14. +99 −0 hardware/arduino/avr/bootloaders/caterina-LilyPadUSB/Caterina.h
  15. +260 −0 hardware/arduino/avr/bootloaders/caterina-LilyPadUSB/Descriptors.c
  16. +139 −0 hardware/arduino/avr/bootloaders/caterina-LilyPadUSB/Descriptors.h
  17. +716 −0 hardware/arduino/avr/bootloaders/caterina-LilyPadUSB/Makefile
  18. +11 −0 hardware/arduino/avr/bootloaders/caterina-LilyPadUSB/Readme.txt
  19. +1,024 −0 hardware/arduino/avr/bootloaders/caterina/Caterina-Micro.hex
  20. +1 −1 hardware/arduino/avr/cores/arduino/HardwareSerial.h
  21. +10 −0 hardware/arduino/avr/cores/arduino/USBCore.cpp
  22. +37 −0 hardware/arduino/avr/variants/micro/pins_arduino.h
View
@@ -1,8 +1,8 @@
#!/bin/sh
-APPDIR="$(dirname -- $(readlink -f -- "${0}") )"
+APPDIR="$(dirname -- "$(readlink -f -- "${0}")" )"
-cd $APPDIR
+cd "$APPDIR"
for LIB in \
java/lib/rt.jar \
@@ -19,4 +19,4 @@ export LD_LIBRARY_PATH
export PATH="${APPDIR}/java/bin:${PATH}"
-java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base
+java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base "$@"
@@ -0,0 +1,96 @@
+/*
+ Keyboard logout
+
+ This sketch demonstrates the Keyboard library.
+
+ When you connect pin 2 to ground, it performs a logout.
+ It uses keyboard combinations to do this, as follows:
+
+ On Windows, CTRL-ALT-DEL followed by ALT-l
+ On Ubuntu, CTRL-ALT-DEL, and ENTER
+ On OSX, CMD-SHIFT-q
+
+ To wake: Spacebar.
+
+ Circuit:
+ * Arduino Leonardo or Micro
+ * wire to connect D2 to ground.
+
+ created 6 Mar 2012
+ modified 27 Mar 2012
+ by Tom Igoe
+
+ This example is in the public domain
+
+ http://www.arduino.cc/en/Tutorial/KeyboardLogout
+ */
+
+#define OSX 0
+#define WINDOWS 1
+#define UBUNTU 2
+
+// change this to match your platform:
+int platform = OSX;
+
+void setup() {
+ // make pin 2 an input and turn on the
+ // pullup resistor so it goes high unless
+ // connected to ground:
+ pinMode(2, INPUT_PULLUP);
+ Keyboard.begin();
+}
+
+void loop() {
+ while (digitalRead(2) == HIGH) {
+ // do nothing until pin 2 goes low
+ delay(500);
+ }
+ delay(1000);
+
+ switch (platform) {
+ case OSX:
+ Keyboard.press(KEY_LEFT_GUI);
+ // Shift-Q logs out:
+ Keyboard.press(KEY_LEFT_SHIFT);
+ Keyboard.press('Q');
+ delay(100);
+ Keyboard.releaseAll();
+ // enter:
+ Keyboard.write(KEY_RETURN);
+ break;
+ case WINDOWS:
+ // CTRL-ALT-DEL:
+ Keyboard.press(KEY_LEFT_CTRL);
+ Keyboard.press(KEY_LEFT_ALT);
+ Keyboard.press(KEY_DELETE);
+ delay(100);
+ Keyboard.releaseAll();
+ //ALT-s:
+ delay(2000);
+ Keyboard.press(KEY_LEFT_ALT);
+ Keyboard.press('l');
+ Keyboard.releaseAll();
+ break;
+ case UBUNTU:
+ // CTRL-ALT-DEL:
+ Keyboard.press(KEY_LEFT_CTRL);
+ Keyboard.press(KEY_LEFT_ALT);
+ Keyboard.press(KEY_DELETE);
+ delay(1000);
+ Keyboard.releaseAll();
+ // Enter to confirm logout:
+ Keyboard.write(KEY_RETURN);
+ break;
+ }
+
+ // do nothing:
+ while(true);
+}
+
+
+
+
+
+
+
+
@@ -1,7 +1,7 @@
/*
Keyboard Button test
- For Leonardo and Due boards only.
+ For the Arduino Leonardo, Micro and Due boards.
Sends a text string when a button is pressed.
@@ -13,7 +13,7 @@
a final key combination (CTRL-U).
Circuit:
- * Arduino Leonardo or Arduino Due
+ * Arduino Leonardo, Micro or Due
* wire to connect D2 to ground.
created 5 Mar 2012
@@ -1,7 +1,7 @@
/*
Keyboard test
- For Leonardo and Due boards only
+ For the Arduino Leonardo, Micro or Due
Reads a byte from the serial port, sends a keystroke back.
The sent keystroke is one higher than what's received, e.g.
@@ -14,14 +14,14 @@
modified 27 Mar 2012
by Tom Igoe
-This example code is in the public domain.
+ This example code is in the public domain.
http://www.arduino.cc/en/Tutorial/KeyboardSerial
*/
void setup() {
// open the serial port:
-Serial.begin(9600);
+ Serial.begin(9600);
// initialize control over the keyboard:
Keyboard.begin();
}
@@ -2,14 +2,11 @@
/*
KeyboardAndMouseControl
- For Leonardo and Due boards only.
-
- Controls the mouse from five pushbuttons on an Arduino Leonardo.
+ Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due.
Hardware:
* 5 pushbuttons attached to D2, D3, D4, D5, D6
-
The mouse movement is always relative. This sketch reads
four pushbuttons, and uses them to set the movement of the mouse.
@@ -4,7 +4,7 @@
For Leonardo and Due boards only.
- Controls the mouse from five pushbuttons on an Arduino Leonardo or Due.
+ Controls the mouse from five pushbuttons on an Arduino Leonardo, Micro or Due.
Hardware:
* 5 pushbuttons attached to D2, D3, D4, D5, D6
@@ -1,9 +1,7 @@
/*
JoystickMouseControl
- For Leonardo and Due boards only.
-
- Controls the mouse from a joystick on an Arduino Leonardo or Due.
+ Controls the mouse from a joystick on an Arduino Leonardo, Micro or Due.
Uses a pushbutton to turn on and off mouse control, and
a second pushbutton to click the left mouse button
@@ -86,11 +86,12 @@ ServiceBinary=%12%\%DRIVERFILENAME%.sys
[SourceDisksFiles]
[SourceDisksNames]
[DeviceList]
-%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0035&MI_00
+%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0037
+%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_8037&MI_00
[DeviceList.NTamd64]
-%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0035&MI_00
-
+%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_0037
+%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_8037&MI_00
;------------------------------------------------------------------------------
; String Definitions
@@ -0,0 +1,107 @@
+;************************************************************
+; Windows USB CDC ACM Setup File
+; Copyright (c) 2000 Microsoft Corporation
+
+
+[Version]
+Signature="$Windows NT$"
+Class=Ports
+ClassGuid={4D36E978-E325-11CE-BFC1-08002BE10318}
+Provider=%MFGNAME%
+LayoutFile=layout.inf
+CatalogFile=%MFGFILENAME%.cat
+DriverVer=11/15/2007,5.1.2600.0
+
+[Manufacturer]
+%MFGNAME%=DeviceList, NTamd64
+
+[DestinationDirs]
+DefaultDestDir=12
+
+
+;------------------------------------------------------------------------------
+; Windows 2000/XP/Vista-32bit Sections
+;------------------------------------------------------------------------------
+
+[DriverInstall.nt]
+include=mdmcpq.inf
+CopyFiles=DriverCopyFiles.nt
+AddReg=DriverInstall.nt.AddReg
+
+[DriverCopyFiles.nt]
+usbser.sys,,,0x20
+
+[DriverInstall.nt.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[DriverInstall.nt.Services]
+AddService=usbser, 0x00000002, DriverService.nt
+
+[DriverService.nt]
+DisplayName=%SERVICE%
+ServiceType=1
+StartType=3
+ErrorControl=1
+ServiceBinary=%12%\%DRIVERFILENAME%.sys
+
+;------------------------------------------------------------------------------
+; Vista-64bit Sections
+;------------------------------------------------------------------------------
+
+[DriverInstall.NTamd64]
+include=mdmcpq.inf
+CopyFiles=DriverCopyFiles.NTamd64
+AddReg=DriverInstall.NTamd64.AddReg
+
+[DriverCopyFiles.NTamd64]
+%DRIVERFILENAME%.sys,,,0x20
+
+[DriverInstall.NTamd64.AddReg]
+HKR,,DevLoader,,*ntkern
+HKR,,NTMPDriver,,%DRIVERFILENAME%.sys
+HKR,,EnumPropPages32,,"MsPorts.dll,SerialPortPropPageProvider"
+
+[DriverInstall.NTamd64.Services]
+AddService=usbser, 0x00000002, DriverService.NTamd64
+
+[DriverService.NTamd64]
+DisplayName=%SERVICE%
+ServiceType=1
+StartType=3
+ErrorControl=1
+ServiceBinary=%12%\%DRIVERFILENAME%.sys
+
+
+;------------------------------------------------------------------------------
+; Vendor and Product ID Definitions
+;------------------------------------------------------------------------------
+; When developing your USB device, the VID and PID used in the PC side
+; application program and the firmware on the microcontroller must match.
+; Modify the below line to use your VID and PID. Use the format as shown below.
+; Note: One INF file can be used for multiple devices with different VID and PIDs.
+; For each supported device, append ",USB\VID_xxxx&PID_yyyy" to the end of the line.
+;------------------------------------------------------------------------------
+[SourceDisksFiles]
+[SourceDisksNames]
+[DeviceList]
+%DESCRIPTION%=DriverInstall, USB\VID_1B4F&PID_9207
+%DESCRIPTION%=DriverInstall, USB\VID_1B4F&PID_9208&MI_00
+
+[DeviceList.NTamd64]
+%DESCRIPTION%=DriverInstall, USB\VID_1B4F&PID_9207
+%DESCRIPTION%=DriverInstall, USB\VID_1B4F&PID_9208&MI_00
+
+;------------------------------------------------------------------------------
+; String Definitions
+;------------------------------------------------------------------------------
+;Modify these strings to customize your device
+;------------------------------------------------------------------------------
+[Strings]
+MFGFILENAME="CDC_vista"
+DRIVERFILENAME ="usbser"
+MFGNAME="SparkFun Electronics"
+INSTDISK="SparkFun LilyPadUSB Driver Installer"
+DESCRIPTION="SparkFun LilyPadUSB"
+SERVICE="USB RS-232 Emulation Driver"
@@ -301,6 +301,34 @@ menu.cpu.bt.atmega168.build.mcu=atmega168
##############################################################
+LilyPadUSB.name=LilyPad Arduino USB
+
+LilyPadUSB.upload.tool=avrdude
+LilyPadUSB.upload.protocol=avr109
+LilyPadUSB.upload.maximum_size=28672
+LilyPadUSB.upload.speed=57600
+LilyPadUSB.upload.disable_flushing=true
+LilyPadUSB.upload.use_1200bps_touch=true
+LilyPadUSB.upload.wait_for_upload_port=true
+
+LilyPadUSB.bootloader.tool=avrdude
+LilyPadUSB.bootloader.low_fuses=0xff
+LilyPadUSB.bootloader.high_fuses=0xd8
+LilyPadUSB.bootloader.extended_fuses=0xce
+LilyPadUSB.bootloader.file=caterina-LilyPadUSB/ Caterina-LilyPadUSB.hex
+LilyPadUSB.bootloader.unlock_bits=0x3F
+LilyPadUSB.bootloader.lock_bits=0x2F
+
+LilyPadUSB.build.mcu=atmega32u4
+LilyPadUSB.build.f_cpu=8000000L
+LilyPadUSB.build.vid=0x1B4F
+LilyPadUSB.build.pid=0x9208
+LilyPadUSB.build.core=arduino
+LilyPadUSB.build.variant=leonardo
+LilyPadUSB.build.extra_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid}
+
+##############################################################
+
lilypad.name=LilyPad Arduino
lilypad.upload.tool=avrdude
@@ -448,4 +476,4 @@ menu.cpu.atmegang.atmega8.bootloader.low_fuses=0xdf
menu.cpu.atmegang.atmega8.bootloader.high_fuses=0xca
menu.cpu.atmegang.atmega8.bootloader.file=atmegang/ATmegaBOOT.hex
-menu.cpu.atmegang.atmega8.build.mcu=atmega8
+menu.cpu.atmegang.atmega8.build.mcu=atmega8
Oops, something went wrong.

0 comments on commit 23c7536

Please sign in to comment.