Merge branch 'master' of github.com:arduino/Arduino into LUFA_bootloader

This commit is contained in:
Zach Eveland 2012-03-14 15:40:29 -04:00
commit d169114205
6 changed files with 147 additions and 20 deletions

View File

@ -122,6 +122,14 @@ public class EditorListener {
}
}
if ((event.getModifiers() & KeyEvent.CTRL_MASK) != 0) {
// Consume ctrl-m(carriage return) keypresses
if (code == KeyEvent.VK_M) {
event.consume(); // does nothing
return false;
}
}
if ((event.getModifiers() & KeyEvent.META_MASK) != 0) {
//event.consume(); // does nothing
return false;

View File

@ -515,7 +515,10 @@ implements TabExpander, Printable
*/
public Dimension getMinimumSize()
{
return getPreferredSize();
Dimension dim = new Dimension();
dim.width = fm.charWidth('w') * 10;
dim.height = fm.getHeight() * 4;
return dim;
}
// package-private members

View File

@ -354,10 +354,9 @@
<target name="linux32-build" depends="linux-build" description="Build linux (32-bit) version">
<!-- Unzip AVR tools -->
<bunzip2 dest="linux" src="linux/avr_tools_linux32.tar.bz2" />
<exec executable="tar" dir="linux/work/hardware">
<arg value="-xf"/>
<arg value="../../avr_tools_linux32.tar"/>
<arg value="-xjf"/>
<arg value="../../avr_tools_linux32.tar.bz2"/>
</exec>
</target>
@ -368,10 +367,9 @@
<chmod perm="755" file="linux/work/hardware/tools/avrdude" />
<!-- Unzip AVR tools -->
<bunzip2 dest="linux" src="linux/avr_tools_linux64.tar.bz2" />
<exec executable="tar" dir="linux/work/hardware">
<arg value="-xf"/>
<arg value="../../avr_tools_linux64.tar"/>
<arg value="-xjf"/>
<arg value="../../avr_tools_linux64.tar.bz2"/>
</exec>
</target>

View File

@ -31,6 +31,7 @@ byte KEYWORD1 Byte
case KEYWORD1 SwitchCase
char KEYWORD1 Char
class KEYWORD1
const KEYWORD1 Const
continue KEYWORD1 Continue
default KEYWORD1 SwitchCase
do KEYWORD1 DoWhile

View File

@ -0,0 +1,106 @@
;************************************************************
; 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_2341&PID_003B
[DeviceList.NTamd64]
%DESCRIPTION%=DriverInstall, USB\VID_2341&PID_003B
;------------------------------------------------------------------------------
; String Definitions
;------------------------------------------------------------------------------
;Modify these strings to customize your device
;------------------------------------------------------------------------------
[Strings]
MFGFILENAME="CDC_vista"
DRIVERFILENAME ="usbser"
MFGNAME="Arduino LLC (www.arduino.cc)"
INSTDISK="Arduino USBSerial Driver Installer"
DESCRIPTION="Arduino UNO"
SERVICE="USB RS-232 Emulation Driver"

View File

@ -12,7 +12,7 @@
created 18 Dec 2009
by David A. Mellis
modified 10 August 2010
modified 12 March 2012
by Tom Igoe
*/
@ -23,14 +23,16 @@
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network.
// gateway and subnet are optional:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte mac[] = {
0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,1, 177);
IPAddress gateway(192,168,1, 1);
IPAddress subnet(255, 255, 0, 0);
// telnet defaults to port 23
EthernetServer server(23);
boolean gotAMessage = false; // whether or not you got a message from the client yet
boolean alreadyConnected = false; // whether or not the client was connected previously
void setup() {
// initialize the ethernet device
@ -39,25 +41,34 @@ void setup() {
server.begin();
// open the serial port
Serial.begin(9600);
Serial.print("Chat server address:");
Serial.println(Ethernet.localIP());
}
void loop() {
// wait for a new client:
EthernetClient client = server.available();
// when the client sends the first byte, say hello:
if (client) {
if (!gotAMessage) {
if (!alreadyConnected) {
// clead out the input buffer:
client.flush();
Serial.println("We have a new client");
client.println("Hello, client!");
gotAMessage = true;
alreadyConnected = true;
}
if (client.available() > 0) {
// read the bytes incoming from the client:
char thisChar = client.read();
// echo the bytes back to the client:
server.write(thisChar);
// echo the bytes to the server as well:
Serial.write(thisChar);
}
// read the bytes incoming from the client:
char thisChar = client.read();
// echo the bytes back to the client:
server.write(thisChar);
// echo the bytes to the server as well:
Serial.print(thisChar);
}
}