From ab1eb4aaa0a00d4f353831c3c7e391c3ce705f55 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 7 Nov 2009 17:05:21 +0000 Subject: [PATCH 2/8] Moving things around. --- hardware/{ => arduino}/boards.txt | 0 .../bootloaders/atmega/ATmegaBOOT_168.c | 0 .../atmega/ATmegaBOOT_168_atmega1280.hex | 0 .../atmega/ATmegaBOOT_168_atmega328.hex | 0 .../ATmegaBOOT_168_atmega328_pro_8MHz.hex | 0 .../atmega/ATmegaBOOT_168_diecimila.hex | 0 .../bootloaders/atmega/ATmegaBOOT_168_ng.hex | 0 .../atmega/ATmegaBOOT_168_pro_8MHz.hex | 0 .../{ => arduino}/bootloaders/atmega/Makefile | 0 .../bootloaders/atmega8/ATmegaBOOT.c | 0 .../bootloaders/atmega8/ATmegaBOOT.hex | 0 .../bootloaders/atmega8/Makefile | 0 .../bootloaders/bt/ATmegaBOOT_168.c | 0 .../bootloaders/bt/ATmegaBOOT_168.hex | 0 .../bootloaders/lilypad/LilyPadBOOT_168.hex | 0 .../bootloaders/lilypad/src/ATmegaBOOT.c | 0 .../bootloaders/lilypad/src/Makefile | 0 .../core}/HardwareSerial.cpp | 0 .../arduino => arduino/core}/HardwareSerial.h | 0 .../{cores/arduino => arduino/core}/Makefile | 0 .../{cores/arduino => arduino/core}/Print.cpp | 0 .../{cores/arduino => arduino/core}/Print.h | 0 .../arduino => arduino/core}/WConstants.h | 0 .../arduino => arduino/core}/WInterrupts.c | 0 .../{cores/arduino => arduino/core}/WMath.cpp | 0 .../arduino => arduino/core}/WProgram.h | 0 .../{cores/arduino => arduino/core}/binary.h | 0 .../{cores/arduino => arduino/core}/main.cxx | 0 .../arduino => arduino/core}/pins_arduino.c | 0 .../arduino => arduino/core}/pins_arduino.h | 0 .../{cores/arduino => arduino/core}/wiring.c | 0 .../{cores/arduino => arduino/core}/wiring.h | 0 .../arduino => arduino/core}/wiring_analog.c | 0 .../arduino => arduino/core}/wiring_digital.c | 0 .../arduino => arduino/core}/wiring_private.h | 0 .../arduino => arduino/core}/wiring_pulse.c | 0 .../arduino => arduino/core}/wiring_shift.c | 0 hardware/{ => arduino}/programmers.txt | 0 hardware/cores/atmega8/pins_atmega8.c | 119 ------------------ hardware/cores/blank/WProgram.h | 0 hardware/cores/blank/main.cxx | 0 41 files changed, 119 deletions(-) rename hardware/{ => arduino}/boards.txt (100%) rename hardware/{ => arduino}/bootloaders/atmega/ATmegaBOOT_168.c (100%) rename hardware/{ => arduino}/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex (100%) rename hardware/{ => arduino}/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex (100%) rename hardware/{ => arduino}/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex (100%) rename hardware/{ => arduino}/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex (100%) rename hardware/{ => arduino}/bootloaders/atmega/ATmegaBOOT_168_ng.hex (100%) rename hardware/{ => arduino}/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex (100%) rename hardware/{ => arduino}/bootloaders/atmega/Makefile (100%) rename hardware/{ => arduino}/bootloaders/atmega8/ATmegaBOOT.c (100%) rename hardware/{ => arduino}/bootloaders/atmega8/ATmegaBOOT.hex (100%) rename hardware/{ => arduino}/bootloaders/atmega8/Makefile (100%) rename hardware/{ => arduino}/bootloaders/bt/ATmegaBOOT_168.c (100%) rename hardware/{ => arduino}/bootloaders/bt/ATmegaBOOT_168.hex (100%) rename hardware/{ => arduino}/bootloaders/lilypad/LilyPadBOOT_168.hex (100%) rename hardware/{ => arduino}/bootloaders/lilypad/src/ATmegaBOOT.c (100%) rename hardware/{ => arduino}/bootloaders/lilypad/src/Makefile (100%) rename hardware/{cores/arduino => arduino/core}/HardwareSerial.cpp (100%) rename hardware/{cores/arduino => arduino/core}/HardwareSerial.h (100%) rename hardware/{cores/arduino => arduino/core}/Makefile (100%) rename hardware/{cores/arduino => arduino/core}/Print.cpp (100%) rename hardware/{cores/arduino => arduino/core}/Print.h (100%) rename hardware/{cores/arduino => arduino/core}/WConstants.h (100%) rename hardware/{cores/arduino => arduino/core}/WInterrupts.c (100%) rename hardware/{cores/arduino => arduino/core}/WMath.cpp (100%) rename hardware/{cores/arduino => arduino/core}/WProgram.h (100%) rename hardware/{cores/arduino => arduino/core}/binary.h (100%) rename hardware/{cores/arduino => arduino/core}/main.cxx (100%) rename hardware/{cores/arduino => arduino/core}/pins_arduino.c (100%) rename hardware/{cores/arduino => arduino/core}/pins_arduino.h (100%) rename hardware/{cores/arduino => arduino/core}/wiring.c (100%) rename hardware/{cores/arduino => arduino/core}/wiring.h (100%) rename hardware/{cores/arduino => arduino/core}/wiring_analog.c (100%) rename hardware/{cores/arduino => arduino/core}/wiring_digital.c (100%) rename hardware/{cores/arduino => arduino/core}/wiring_private.h (100%) rename hardware/{cores/arduino => arduino/core}/wiring_pulse.c (100%) rename hardware/{cores/arduino => arduino/core}/wiring_shift.c (100%) rename hardware/{ => arduino}/programmers.txt (100%) delete mode 100755 hardware/cores/atmega8/pins_atmega8.c delete mode 100755 hardware/cores/blank/WProgram.h delete mode 100644 hardware/cores/blank/main.cxx diff --git a/hardware/boards.txt b/hardware/arduino/boards.txt similarity index 100% rename from hardware/boards.txt rename to hardware/arduino/boards.txt diff --git a/hardware/bootloaders/atmega/ATmegaBOOT_168.c b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168.c similarity index 100% rename from hardware/bootloaders/atmega/ATmegaBOOT_168.c rename to hardware/arduino/bootloaders/atmega/ATmegaBOOT_168.c diff --git a/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex similarity index 100% rename from hardware/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex rename to hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega1280.hex diff --git a/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex similarity index 100% rename from hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex rename to hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328.hex diff --git a/hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex similarity index 100% rename from hardware/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex rename to hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_atmega328_pro_8MHz.hex diff --git a/hardware/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex similarity index 100% rename from hardware/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex rename to hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_diecimila.hex diff --git a/hardware/bootloaders/atmega/ATmegaBOOT_168_ng.hex b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_ng.hex similarity index 100% rename from hardware/bootloaders/atmega/ATmegaBOOT_168_ng.hex rename to hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_ng.hex diff --git a/hardware/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex b/hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex similarity index 100% rename from hardware/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex rename to hardware/arduino/bootloaders/atmega/ATmegaBOOT_168_pro_8MHz.hex diff --git a/hardware/bootloaders/atmega/Makefile b/hardware/arduino/bootloaders/atmega/Makefile similarity index 100% rename from hardware/bootloaders/atmega/Makefile rename to hardware/arduino/bootloaders/atmega/Makefile diff --git a/hardware/bootloaders/atmega8/ATmegaBOOT.c b/hardware/arduino/bootloaders/atmega8/ATmegaBOOT.c similarity index 100% rename from hardware/bootloaders/atmega8/ATmegaBOOT.c rename to hardware/arduino/bootloaders/atmega8/ATmegaBOOT.c diff --git a/hardware/bootloaders/atmega8/ATmegaBOOT.hex b/hardware/arduino/bootloaders/atmega8/ATmegaBOOT.hex similarity index 100% rename from hardware/bootloaders/atmega8/ATmegaBOOT.hex rename to hardware/arduino/bootloaders/atmega8/ATmegaBOOT.hex diff --git a/hardware/bootloaders/atmega8/Makefile b/hardware/arduino/bootloaders/atmega8/Makefile similarity index 100% rename from hardware/bootloaders/atmega8/Makefile rename to hardware/arduino/bootloaders/atmega8/Makefile diff --git a/hardware/bootloaders/bt/ATmegaBOOT_168.c b/hardware/arduino/bootloaders/bt/ATmegaBOOT_168.c similarity index 100% rename from hardware/bootloaders/bt/ATmegaBOOT_168.c rename to hardware/arduino/bootloaders/bt/ATmegaBOOT_168.c diff --git a/hardware/bootloaders/bt/ATmegaBOOT_168.hex b/hardware/arduino/bootloaders/bt/ATmegaBOOT_168.hex similarity index 100% rename from hardware/bootloaders/bt/ATmegaBOOT_168.hex rename to hardware/arduino/bootloaders/bt/ATmegaBOOT_168.hex diff --git a/hardware/bootloaders/lilypad/LilyPadBOOT_168.hex b/hardware/arduino/bootloaders/lilypad/LilyPadBOOT_168.hex similarity index 100% rename from hardware/bootloaders/lilypad/LilyPadBOOT_168.hex rename to hardware/arduino/bootloaders/lilypad/LilyPadBOOT_168.hex diff --git a/hardware/bootloaders/lilypad/src/ATmegaBOOT.c b/hardware/arduino/bootloaders/lilypad/src/ATmegaBOOT.c similarity index 100% rename from hardware/bootloaders/lilypad/src/ATmegaBOOT.c rename to hardware/arduino/bootloaders/lilypad/src/ATmegaBOOT.c diff --git a/hardware/bootloaders/lilypad/src/Makefile b/hardware/arduino/bootloaders/lilypad/src/Makefile similarity index 100% rename from hardware/bootloaders/lilypad/src/Makefile rename to hardware/arduino/bootloaders/lilypad/src/Makefile diff --git a/hardware/cores/arduino/HardwareSerial.cpp b/hardware/arduino/core/HardwareSerial.cpp similarity index 100% rename from hardware/cores/arduino/HardwareSerial.cpp rename to hardware/arduino/core/HardwareSerial.cpp diff --git a/hardware/cores/arduino/HardwareSerial.h b/hardware/arduino/core/HardwareSerial.h similarity index 100% rename from hardware/cores/arduino/HardwareSerial.h rename to hardware/arduino/core/HardwareSerial.h diff --git a/hardware/cores/arduino/Makefile b/hardware/arduino/core/Makefile similarity index 100% rename from hardware/cores/arduino/Makefile rename to hardware/arduino/core/Makefile diff --git a/hardware/cores/arduino/Print.cpp b/hardware/arduino/core/Print.cpp similarity index 100% rename from hardware/cores/arduino/Print.cpp rename to hardware/arduino/core/Print.cpp diff --git a/hardware/cores/arduino/Print.h b/hardware/arduino/core/Print.h similarity index 100% rename from hardware/cores/arduino/Print.h rename to hardware/arduino/core/Print.h diff --git a/hardware/cores/arduino/WConstants.h b/hardware/arduino/core/WConstants.h similarity index 100% rename from hardware/cores/arduino/WConstants.h rename to hardware/arduino/core/WConstants.h diff --git a/hardware/cores/arduino/WInterrupts.c b/hardware/arduino/core/WInterrupts.c similarity index 100% rename from hardware/cores/arduino/WInterrupts.c rename to hardware/arduino/core/WInterrupts.c diff --git a/hardware/cores/arduino/WMath.cpp b/hardware/arduino/core/WMath.cpp similarity index 100% rename from hardware/cores/arduino/WMath.cpp rename to hardware/arduino/core/WMath.cpp diff --git a/hardware/cores/arduino/WProgram.h b/hardware/arduino/core/WProgram.h similarity index 100% rename from hardware/cores/arduino/WProgram.h rename to hardware/arduino/core/WProgram.h diff --git a/hardware/cores/arduino/binary.h b/hardware/arduino/core/binary.h similarity index 100% rename from hardware/cores/arduino/binary.h rename to hardware/arduino/core/binary.h diff --git a/hardware/cores/arduino/main.cxx b/hardware/arduino/core/main.cxx similarity index 100% rename from hardware/cores/arduino/main.cxx rename to hardware/arduino/core/main.cxx diff --git a/hardware/cores/arduino/pins_arduino.c b/hardware/arduino/core/pins_arduino.c similarity index 100% rename from hardware/cores/arduino/pins_arduino.c rename to hardware/arduino/core/pins_arduino.c diff --git a/hardware/cores/arduino/pins_arduino.h b/hardware/arduino/core/pins_arduino.h similarity index 100% rename from hardware/cores/arduino/pins_arduino.h rename to hardware/arduino/core/pins_arduino.h diff --git a/hardware/cores/arduino/wiring.c b/hardware/arduino/core/wiring.c similarity index 100% rename from hardware/cores/arduino/wiring.c rename to hardware/arduino/core/wiring.c diff --git a/hardware/cores/arduino/wiring.h b/hardware/arduino/core/wiring.h similarity index 100% rename from hardware/cores/arduino/wiring.h rename to hardware/arduino/core/wiring.h diff --git a/hardware/cores/arduino/wiring_analog.c b/hardware/arduino/core/wiring_analog.c similarity index 100% rename from hardware/cores/arduino/wiring_analog.c rename to hardware/arduino/core/wiring_analog.c diff --git a/hardware/cores/arduino/wiring_digital.c b/hardware/arduino/core/wiring_digital.c similarity index 100% rename from hardware/cores/arduino/wiring_digital.c rename to hardware/arduino/core/wiring_digital.c diff --git a/hardware/cores/arduino/wiring_private.h b/hardware/arduino/core/wiring_private.h similarity index 100% rename from hardware/cores/arduino/wiring_private.h rename to hardware/arduino/core/wiring_private.h diff --git a/hardware/cores/arduino/wiring_pulse.c b/hardware/arduino/core/wiring_pulse.c similarity index 100% rename from hardware/cores/arduino/wiring_pulse.c rename to hardware/arduino/core/wiring_pulse.c diff --git a/hardware/cores/arduino/wiring_shift.c b/hardware/arduino/core/wiring_shift.c similarity index 100% rename from hardware/cores/arduino/wiring_shift.c rename to hardware/arduino/core/wiring_shift.c diff --git a/hardware/programmers.txt b/hardware/arduino/programmers.txt similarity index 100% rename from hardware/programmers.txt rename to hardware/arduino/programmers.txt diff --git a/hardware/cores/atmega8/pins_atmega8.c b/hardware/cores/atmega8/pins_atmega8.c deleted file mode 100755 index ed1b2bdd7..000000000 --- a/hardware/cores/atmega8/pins_atmega8.c +++ /dev/null @@ -1,119 +0,0 @@ -/* - pin_atmega8.c - pin definitions for the atmega8 - Part of Arduino / Wiring Lite - - Copyright (c) 2005 David A. Mellis - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General - Public License along with this library; if not, write to the - Free Software Foundation, Inc., 59 Temple Place, Suite 330, - Boston, MA 02111-1307 USA - - $Id$ -*/ - -#include -#include "wiring.h" - -// We map the pin numbers passed to digitalRead() or -// analogRead() directly to the corresponding pin -// numbers on the Atmega8. No distinction is made -// between analog and digital pins. - -// ATMEL ATMEGA8 -// -// +-\/-+ -// PC6 1| |28 PC5 -// PD0 2| |27 PC4 -// PD1 3| |26 PC3 -// PD2 4| |25 PC2 -// PD3 5| |24 PC1 -// PD4 6| |23 PC0 -// VCC 7| |22 GND -// GND 8| |21 AREF -// PB6 9| |20 AVCC -// PB7 10| |19 PB5 -// PD5 11| |18 PB4 -// PD6 12| |17 PB3 -// PD7 13| |16 PB2 -// PB0 14| |15 PB1 -// +----+ - -#define NUM_PINS 28 -#define NUM_PORTS 4 - -#define PB 2 -#define PC 3 -#define PD 4 - -int port_to_mode[NUM_PORTS + 1] = { - NOT_A_PORT, - NOT_A_PORT, - _SFR_IO_ADDR(DDRB), - _SFR_IO_ADDR(DDRC), - _SFR_IO_ADDR(DDRD), -}; - -int port_to_output[NUM_PORTS + 1] = { - NOT_A_PORT, - NOT_A_PORT, - _SFR_IO_ADDR(PORTB), - _SFR_IO_ADDR(PORTC), - _SFR_IO_ADDR(PORTD), -}; - -int port_to_input[NUM_PORTS + 1] = { - NOT_A_PORT, - NOT_A_PORT, - _SFR_IO_ADDR(PINB), - _SFR_IO_ADDR(PINC), - _SFR_IO_ADDR(PIND), -}; - -pin_t digital_pin_to_port_array[] = { - { NOT_A_PIN, NOT_A_PIN }, - - { PC, 6 }, - { PD, 0 }, - { PD, 1 }, - { PD, 2 }, - { PD, 3 }, - { PD, 4 }, - { NOT_A_PIN, NOT_A_PIN }, - { NOT_A_PIN, NOT_A_PIN }, - { PB, 6 }, - { PB, 7 }, - { PD, 5 }, - { PD, 6 }, - { PD, 7 }, - { PB, 0 }, - - { PB, 1 }, - { PB, 2 }, - { PB, 3 }, - { PB, 4 }, - { PB, 5 }, - { NOT_A_PIN, NOT_A_PIN }, - { NOT_A_PIN, NOT_A_PIN }, - { NOT_A_PIN, NOT_A_PIN }, - { PC, 0 }, - { PC, 1 }, - { PC, 2 }, - { PC, 3 }, - { PC, 4 }, - { PC, 5 }, -}; - -pin_t *digital_pin_to_port = digital_pin_to_port_array; -pin_t *analog_in_pin_to_port = digital_pin_to_port_array; -pin_t *analog_out_pin_to_port = digital_pin_to_port_array; diff --git a/hardware/cores/blank/WProgram.h b/hardware/cores/blank/WProgram.h deleted file mode 100755 index e69de29bb..000000000 diff --git a/hardware/cores/blank/main.cxx b/hardware/cores/blank/main.cxx deleted file mode 100644 index e69de29bb..000000000 From ff0336a3b693c93c457a3cdfbb1e537edb13990c Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 7 Nov 2009 17:07:59 +0000 Subject: [PATCH 3/8] Moving libraries into arduino/ --- hardware/{ => arduino}/libraries/EEPROM/EEPROM.cpp | 0 hardware/{ => arduino}/libraries/EEPROM/EEPROM.h | 0 .../libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde | 0 .../libraries/EEPROM/examples/eeprom_read/eeprom_read.pde | 0 .../libraries/EEPROM/examples/eeprom_write/eeprom_write.pde | 0 hardware/{ => arduino}/libraries/EEPROM/keywords.txt | 0 hardware/{ => arduino}/libraries/Ethernet/Client.cpp | 0 hardware/{ => arduino}/libraries/Ethernet/Client.h | 0 hardware/{ => arduino}/libraries/Ethernet/Ethernet.cpp | 0 hardware/{ => arduino}/libraries/Ethernet/Ethernet.h | 0 hardware/{ => arduino}/libraries/Ethernet/Server.cpp | 0 hardware/{ => arduino}/libraries/Ethernet/Server.h | 0 .../libraries/Ethernet/examples/ChatServer/ChatServer.pde | 0 .../libraries/Ethernet/examples/WebClient/WebClient.pde | 0 .../libraries/Ethernet/examples/WebServer/WebServer.pde | 0 hardware/{ => arduino}/libraries/Ethernet/keywords.txt | 0 hardware/{ => arduino}/libraries/Ethernet/utility/socket.c | 0 hardware/{ => arduino}/libraries/Ethernet/utility/socket.h | 0 hardware/{ => arduino}/libraries/Ethernet/utility/spi.h | 0 hardware/{ => arduino}/libraries/Ethernet/utility/types.h | 0 hardware/{ => arduino}/libraries/Ethernet/utility/w5100.c | 0 hardware/{ => arduino}/libraries/Ethernet/utility/w5100.h | 0 hardware/{ => arduino}/libraries/Firmata/Firmata.cpp | 0 hardware/{ => arduino}/libraries/Firmata/Firmata.h | 0 hardware/{ => arduino}/libraries/Firmata/LICENSE.txt | 0 hardware/{ => arduino}/libraries/Firmata/TODO.txt | 0 .../libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde | 0 .../libraries/Firmata/examples/AnalogFirmata/Makefile | 0 .../libraries/Firmata/examples/EchoString/EchoString.pde | 0 .../{ => arduino}/libraries/Firmata/examples/EchoString/Makefile | 0 .../libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde | 0 .../libraries/Firmata/examples/ServoFirmata/Makefile | 0 .../libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde | 0 .../libraries/Firmata/examples/SimpleAnalogFirmata/Makefile | 0 .../Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde | 0 .../libraries/Firmata/examples/SimpleDigitalFirmata/Makefile | 0 .../examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde | 0 .../libraries/Firmata/examples/StandardFirmata/LICENSE.txt | 0 .../libraries/Firmata/examples/StandardFirmata/Makefile | 0 .../Firmata/examples/StandardFirmata/StandardFirmata.pde | 0 hardware/{ => arduino}/libraries/Firmata/keywords.txt | 0 hardware/{ => arduino}/libraries/LiquidCrystal/LiquidCrystal.cpp | 0 hardware/{ => arduino}/libraries/LiquidCrystal/LiquidCrystal.h | 0 .../libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde | 0 .../libraries/LiquidCrystal/examples/Blink/Blink.pde | 0 .../libraries/LiquidCrystal/examples/Cursor/Cursor.pde | 0 .../libraries/LiquidCrystal/examples/Display/Display.pde | 0 .../libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde | 0 .../libraries/LiquidCrystal/examples/Scroll/Scroll.pde | 0 .../LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde | 0 .../LiquidCrystal/examples/TextDirection/TextDirection.pde | 0 .../libraries/LiquidCrystal/examples/setCursor/setCursor.pde | 0 hardware/{ => arduino}/libraries/LiquidCrystal/keywords.txt | 0 hardware/{ => arduino}/libraries/Matrix/Matrix.cpp | 0 hardware/{ => arduino}/libraries/Matrix/Matrix.h | 0 .../libraries/Matrix/examples/hello_matrix/hello_matrix.pde | 0 .../Matrix/examples/sprite_animation/sprite_animation.pde | 0 hardware/{ => arduino}/libraries/Matrix/keywords.txt | 0 hardware/{ => arduino}/libraries/Servo/Servo.cpp | 0 hardware/{ => arduino}/libraries/Servo/Servo.h | 0 hardware/{ => arduino}/libraries/Servo/examples/Knob/Knob.pde | 0 hardware/{ => arduino}/libraries/Servo/examples/Sweep/Sweep.pde | 0 hardware/{ => arduino}/libraries/Servo/keywords.txt | 0 .../{ => arduino}/libraries/SoftwareSerial/SoftwareSerial.cpp | 0 hardware/{ => arduino}/libraries/SoftwareSerial/SoftwareSerial.h | 0 hardware/{ => arduino}/libraries/SoftwareSerial/keywords.txt | 0 hardware/{ => arduino}/libraries/Sprite/Sprite.cpp | 0 hardware/{ => arduino}/libraries/Sprite/Sprite.h | 0 hardware/{ => arduino}/libraries/Sprite/binary.h | 0 hardware/{ => arduino}/libraries/Sprite/keywords.txt | 0 hardware/{ => arduino}/libraries/Stepper/Stepper.cpp | 0 hardware/{ => arduino}/libraries/Stepper/Stepper.h | 0 .../libraries/Stepper/examples/MotorKnob/MotorKnob.pde | 0 hardware/{ => arduino}/libraries/Stepper/keywords.txt | 0 hardware/{ => arduino}/libraries/Wire/Wire.cpp | 0 hardware/{ => arduino}/libraries/Wire/Wire.h | 0 .../libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde | 0 .../Wire/examples/digital_potentiometer/digital_potentiometer.pde | 0 .../libraries/Wire/examples/master_reader/master_reader.pde | 0 .../libraries/Wire/examples/master_writer/master_writer.pde | 0 .../libraries/Wire/examples/slave_receiver/slave_receiver.pde | 0 .../libraries/Wire/examples/slave_sender/slave_sender.pde | 0 hardware/{ => arduino}/libraries/Wire/keywords.txt | 0 hardware/{ => arduino}/libraries/Wire/utility/twi.c | 0 hardware/{ => arduino}/libraries/Wire/utility/twi.h | 0 85 files changed, 0 insertions(+), 0 deletions(-) rename hardware/{ => arduino}/libraries/EEPROM/EEPROM.cpp (100%) rename hardware/{ => arduino}/libraries/EEPROM/EEPROM.h (100%) rename hardware/{ => arduino}/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde (100%) rename hardware/{ => arduino}/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde (100%) rename hardware/{ => arduino}/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde (100%) rename hardware/{ => arduino}/libraries/EEPROM/keywords.txt (100%) rename hardware/{ => arduino}/libraries/Ethernet/Client.cpp (100%) rename hardware/{ => arduino}/libraries/Ethernet/Client.h (100%) rename hardware/{ => arduino}/libraries/Ethernet/Ethernet.cpp (100%) rename hardware/{ => arduino}/libraries/Ethernet/Ethernet.h (100%) rename hardware/{ => arduino}/libraries/Ethernet/Server.cpp (100%) rename hardware/{ => arduino}/libraries/Ethernet/Server.h (100%) rename hardware/{ => arduino}/libraries/Ethernet/examples/ChatServer/ChatServer.pde (100%) rename hardware/{ => arduino}/libraries/Ethernet/examples/WebClient/WebClient.pde (100%) rename hardware/{ => arduino}/libraries/Ethernet/examples/WebServer/WebServer.pde (100%) rename hardware/{ => arduino}/libraries/Ethernet/keywords.txt (100%) rename hardware/{ => arduino}/libraries/Ethernet/utility/socket.c (100%) rename hardware/{ => arduino}/libraries/Ethernet/utility/socket.h (100%) rename hardware/{ => arduino}/libraries/Ethernet/utility/spi.h (100%) rename hardware/{ => arduino}/libraries/Ethernet/utility/types.h (100%) rename hardware/{ => arduino}/libraries/Ethernet/utility/w5100.c (100%) rename hardware/{ => arduino}/libraries/Ethernet/utility/w5100.h (100%) rename hardware/{ => arduino}/libraries/Firmata/Firmata.cpp (100%) rename hardware/{ => arduino}/libraries/Firmata/Firmata.h (100%) rename hardware/{ => arduino}/libraries/Firmata/LICENSE.txt (100%) rename hardware/{ => arduino}/libraries/Firmata/TODO.txt (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/AnalogFirmata/Makefile (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/EchoString/EchoString.pde (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/EchoString/Makefile (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/ServoFirmata/Makefile (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/StandardFirmata/LICENSE.txt (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/StandardFirmata/Makefile (100%) rename hardware/{ => arduino}/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde (100%) rename hardware/{ => arduino}/libraries/Firmata/keywords.txt (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/LiquidCrystal.cpp (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/LiquidCrystal.h (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/Blink/Blink.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/Cursor/Cursor.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/Display/Display.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/Scroll/Scroll.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/examples/setCursor/setCursor.pde (100%) rename hardware/{ => arduino}/libraries/LiquidCrystal/keywords.txt (100%) rename hardware/{ => arduino}/libraries/Matrix/Matrix.cpp (100%) rename hardware/{ => arduino}/libraries/Matrix/Matrix.h (100%) rename hardware/{ => arduino}/libraries/Matrix/examples/hello_matrix/hello_matrix.pde (100%) rename hardware/{ => arduino}/libraries/Matrix/examples/sprite_animation/sprite_animation.pde (100%) rename hardware/{ => arduino}/libraries/Matrix/keywords.txt (100%) rename hardware/{ => arduino}/libraries/Servo/Servo.cpp (100%) rename hardware/{ => arduino}/libraries/Servo/Servo.h (100%) rename hardware/{ => arduino}/libraries/Servo/examples/Knob/Knob.pde (100%) rename hardware/{ => arduino}/libraries/Servo/examples/Sweep/Sweep.pde (100%) rename hardware/{ => arduino}/libraries/Servo/keywords.txt (100%) rename hardware/{ => arduino}/libraries/SoftwareSerial/SoftwareSerial.cpp (100%) rename hardware/{ => arduino}/libraries/SoftwareSerial/SoftwareSerial.h (100%) rename hardware/{ => arduino}/libraries/SoftwareSerial/keywords.txt (100%) rename hardware/{ => arduino}/libraries/Sprite/Sprite.cpp (100%) rename hardware/{ => arduino}/libraries/Sprite/Sprite.h (100%) rename hardware/{ => arduino}/libraries/Sprite/binary.h (100%) rename hardware/{ => arduino}/libraries/Sprite/keywords.txt (100%) rename hardware/{ => arduino}/libraries/Stepper/Stepper.cpp (100%) rename hardware/{ => arduino}/libraries/Stepper/Stepper.h (100%) rename hardware/{ => arduino}/libraries/Stepper/examples/MotorKnob/MotorKnob.pde (100%) rename hardware/{ => arduino}/libraries/Stepper/keywords.txt (100%) rename hardware/{ => arduino}/libraries/Wire/Wire.cpp (100%) rename hardware/{ => arduino}/libraries/Wire/Wire.h (100%) rename hardware/{ => arduino}/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde (100%) rename hardware/{ => arduino}/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde (100%) rename hardware/{ => arduino}/libraries/Wire/examples/master_reader/master_reader.pde (100%) rename hardware/{ => arduino}/libraries/Wire/examples/master_writer/master_writer.pde (100%) rename hardware/{ => arduino}/libraries/Wire/examples/slave_receiver/slave_receiver.pde (100%) rename hardware/{ => arduino}/libraries/Wire/examples/slave_sender/slave_sender.pde (100%) rename hardware/{ => arduino}/libraries/Wire/keywords.txt (100%) rename hardware/{ => arduino}/libraries/Wire/utility/twi.c (100%) rename hardware/{ => arduino}/libraries/Wire/utility/twi.h (100%) diff --git a/hardware/libraries/EEPROM/EEPROM.cpp b/hardware/arduino/libraries/EEPROM/EEPROM.cpp similarity index 100% rename from hardware/libraries/EEPROM/EEPROM.cpp rename to hardware/arduino/libraries/EEPROM/EEPROM.cpp diff --git a/hardware/libraries/EEPROM/EEPROM.h b/hardware/arduino/libraries/EEPROM/EEPROM.h similarity index 100% rename from hardware/libraries/EEPROM/EEPROM.h rename to hardware/arduino/libraries/EEPROM/EEPROM.h diff --git a/hardware/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde b/hardware/arduino/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde similarity index 100% rename from hardware/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde rename to hardware/arduino/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde diff --git a/hardware/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde b/hardware/arduino/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde similarity index 100% rename from hardware/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde rename to hardware/arduino/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde diff --git a/hardware/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde b/hardware/arduino/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde similarity index 100% rename from hardware/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde rename to hardware/arduino/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde diff --git a/hardware/libraries/EEPROM/keywords.txt b/hardware/arduino/libraries/EEPROM/keywords.txt similarity index 100% rename from hardware/libraries/EEPROM/keywords.txt rename to hardware/arduino/libraries/EEPROM/keywords.txt diff --git a/hardware/libraries/Ethernet/Client.cpp b/hardware/arduino/libraries/Ethernet/Client.cpp similarity index 100% rename from hardware/libraries/Ethernet/Client.cpp rename to hardware/arduino/libraries/Ethernet/Client.cpp diff --git a/hardware/libraries/Ethernet/Client.h b/hardware/arduino/libraries/Ethernet/Client.h similarity index 100% rename from hardware/libraries/Ethernet/Client.h rename to hardware/arduino/libraries/Ethernet/Client.h diff --git a/hardware/libraries/Ethernet/Ethernet.cpp b/hardware/arduino/libraries/Ethernet/Ethernet.cpp similarity index 100% rename from hardware/libraries/Ethernet/Ethernet.cpp rename to hardware/arduino/libraries/Ethernet/Ethernet.cpp diff --git a/hardware/libraries/Ethernet/Ethernet.h b/hardware/arduino/libraries/Ethernet/Ethernet.h similarity index 100% rename from hardware/libraries/Ethernet/Ethernet.h rename to hardware/arduino/libraries/Ethernet/Ethernet.h diff --git a/hardware/libraries/Ethernet/Server.cpp b/hardware/arduino/libraries/Ethernet/Server.cpp similarity index 100% rename from hardware/libraries/Ethernet/Server.cpp rename to hardware/arduino/libraries/Ethernet/Server.cpp diff --git a/hardware/libraries/Ethernet/Server.h b/hardware/arduino/libraries/Ethernet/Server.h similarity index 100% rename from hardware/libraries/Ethernet/Server.h rename to hardware/arduino/libraries/Ethernet/Server.h diff --git a/hardware/libraries/Ethernet/examples/ChatServer/ChatServer.pde b/hardware/arduino/libraries/Ethernet/examples/ChatServer/ChatServer.pde similarity index 100% rename from hardware/libraries/Ethernet/examples/ChatServer/ChatServer.pde rename to hardware/arduino/libraries/Ethernet/examples/ChatServer/ChatServer.pde diff --git a/hardware/libraries/Ethernet/examples/WebClient/WebClient.pde b/hardware/arduino/libraries/Ethernet/examples/WebClient/WebClient.pde similarity index 100% rename from hardware/libraries/Ethernet/examples/WebClient/WebClient.pde rename to hardware/arduino/libraries/Ethernet/examples/WebClient/WebClient.pde diff --git a/hardware/libraries/Ethernet/examples/WebServer/WebServer.pde b/hardware/arduino/libraries/Ethernet/examples/WebServer/WebServer.pde similarity index 100% rename from hardware/libraries/Ethernet/examples/WebServer/WebServer.pde rename to hardware/arduino/libraries/Ethernet/examples/WebServer/WebServer.pde diff --git a/hardware/libraries/Ethernet/keywords.txt b/hardware/arduino/libraries/Ethernet/keywords.txt similarity index 100% rename from hardware/libraries/Ethernet/keywords.txt rename to hardware/arduino/libraries/Ethernet/keywords.txt diff --git a/hardware/libraries/Ethernet/utility/socket.c b/hardware/arduino/libraries/Ethernet/utility/socket.c similarity index 100% rename from hardware/libraries/Ethernet/utility/socket.c rename to hardware/arduino/libraries/Ethernet/utility/socket.c diff --git a/hardware/libraries/Ethernet/utility/socket.h b/hardware/arduino/libraries/Ethernet/utility/socket.h similarity index 100% rename from hardware/libraries/Ethernet/utility/socket.h rename to hardware/arduino/libraries/Ethernet/utility/socket.h diff --git a/hardware/libraries/Ethernet/utility/spi.h b/hardware/arduino/libraries/Ethernet/utility/spi.h similarity index 100% rename from hardware/libraries/Ethernet/utility/spi.h rename to hardware/arduino/libraries/Ethernet/utility/spi.h diff --git a/hardware/libraries/Ethernet/utility/types.h b/hardware/arduino/libraries/Ethernet/utility/types.h similarity index 100% rename from hardware/libraries/Ethernet/utility/types.h rename to hardware/arduino/libraries/Ethernet/utility/types.h diff --git a/hardware/libraries/Ethernet/utility/w5100.c b/hardware/arduino/libraries/Ethernet/utility/w5100.c similarity index 100% rename from hardware/libraries/Ethernet/utility/w5100.c rename to hardware/arduino/libraries/Ethernet/utility/w5100.c diff --git a/hardware/libraries/Ethernet/utility/w5100.h b/hardware/arduino/libraries/Ethernet/utility/w5100.h similarity index 100% rename from hardware/libraries/Ethernet/utility/w5100.h rename to hardware/arduino/libraries/Ethernet/utility/w5100.h diff --git a/hardware/libraries/Firmata/Firmata.cpp b/hardware/arduino/libraries/Firmata/Firmata.cpp similarity index 100% rename from hardware/libraries/Firmata/Firmata.cpp rename to hardware/arduino/libraries/Firmata/Firmata.cpp diff --git a/hardware/libraries/Firmata/Firmata.h b/hardware/arduino/libraries/Firmata/Firmata.h similarity index 100% rename from hardware/libraries/Firmata/Firmata.h rename to hardware/arduino/libraries/Firmata/Firmata.h diff --git a/hardware/libraries/Firmata/LICENSE.txt b/hardware/arduino/libraries/Firmata/LICENSE.txt similarity index 100% rename from hardware/libraries/Firmata/LICENSE.txt rename to hardware/arduino/libraries/Firmata/LICENSE.txt diff --git a/hardware/libraries/Firmata/TODO.txt b/hardware/arduino/libraries/Firmata/TODO.txt similarity index 100% rename from hardware/libraries/Firmata/TODO.txt rename to hardware/arduino/libraries/Firmata/TODO.txt diff --git a/hardware/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde b/hardware/arduino/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde similarity index 100% rename from hardware/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde rename to hardware/arduino/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde diff --git a/hardware/libraries/Firmata/examples/AnalogFirmata/Makefile b/hardware/arduino/libraries/Firmata/examples/AnalogFirmata/Makefile similarity index 100% rename from hardware/libraries/Firmata/examples/AnalogFirmata/Makefile rename to hardware/arduino/libraries/Firmata/examples/AnalogFirmata/Makefile diff --git a/hardware/libraries/Firmata/examples/EchoString/EchoString.pde b/hardware/arduino/libraries/Firmata/examples/EchoString/EchoString.pde similarity index 100% rename from hardware/libraries/Firmata/examples/EchoString/EchoString.pde rename to hardware/arduino/libraries/Firmata/examples/EchoString/EchoString.pde diff --git a/hardware/libraries/Firmata/examples/EchoString/Makefile b/hardware/arduino/libraries/Firmata/examples/EchoString/Makefile similarity index 100% rename from hardware/libraries/Firmata/examples/EchoString/Makefile rename to hardware/arduino/libraries/Firmata/examples/EchoString/Makefile diff --git a/hardware/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde b/hardware/arduino/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde similarity index 100% rename from hardware/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde rename to hardware/arduino/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde diff --git a/hardware/libraries/Firmata/examples/ServoFirmata/Makefile b/hardware/arduino/libraries/Firmata/examples/ServoFirmata/Makefile similarity index 100% rename from hardware/libraries/Firmata/examples/ServoFirmata/Makefile rename to hardware/arduino/libraries/Firmata/examples/ServoFirmata/Makefile diff --git a/hardware/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde b/hardware/arduino/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde similarity index 100% rename from hardware/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde rename to hardware/arduino/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde diff --git a/hardware/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile b/hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile similarity index 100% rename from hardware/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile rename to hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile diff --git a/hardware/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde b/hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde similarity index 100% rename from hardware/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde rename to hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde diff --git a/hardware/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile b/hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile similarity index 100% rename from hardware/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile rename to hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile diff --git a/hardware/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde b/hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde similarity index 100% rename from hardware/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde rename to hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde diff --git a/hardware/libraries/Firmata/examples/StandardFirmata/LICENSE.txt b/hardware/arduino/libraries/Firmata/examples/StandardFirmata/LICENSE.txt similarity index 100% rename from hardware/libraries/Firmata/examples/StandardFirmata/LICENSE.txt rename to hardware/arduino/libraries/Firmata/examples/StandardFirmata/LICENSE.txt diff --git a/hardware/libraries/Firmata/examples/StandardFirmata/Makefile b/hardware/arduino/libraries/Firmata/examples/StandardFirmata/Makefile similarity index 100% rename from hardware/libraries/Firmata/examples/StandardFirmata/Makefile rename to hardware/arduino/libraries/Firmata/examples/StandardFirmata/Makefile diff --git a/hardware/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde b/hardware/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde similarity index 100% rename from hardware/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde rename to hardware/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde diff --git a/hardware/libraries/Firmata/keywords.txt b/hardware/arduino/libraries/Firmata/keywords.txt similarity index 100% rename from hardware/libraries/Firmata/keywords.txt rename to hardware/arduino/libraries/Firmata/keywords.txt diff --git a/hardware/libraries/LiquidCrystal/LiquidCrystal.cpp b/hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.cpp similarity index 100% rename from hardware/libraries/LiquidCrystal/LiquidCrystal.cpp rename to hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.cpp diff --git a/hardware/libraries/LiquidCrystal/LiquidCrystal.h b/hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.h similarity index 100% rename from hardware/libraries/LiquidCrystal/LiquidCrystal.h rename to hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.h diff --git a/hardware/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde b/hardware/arduino/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde diff --git a/hardware/libraries/LiquidCrystal/examples/Blink/Blink.pde b/hardware/arduino/libraries/LiquidCrystal/examples/Blink/Blink.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/Blink/Blink.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/Blink/Blink.pde diff --git a/hardware/libraries/LiquidCrystal/examples/Cursor/Cursor.pde b/hardware/arduino/libraries/LiquidCrystal/examples/Cursor/Cursor.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/Cursor/Cursor.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/Cursor/Cursor.pde diff --git a/hardware/libraries/LiquidCrystal/examples/Display/Display.pde b/hardware/arduino/libraries/LiquidCrystal/examples/Display/Display.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/Display/Display.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/Display/Display.pde diff --git a/hardware/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde b/hardware/arduino/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde diff --git a/hardware/libraries/LiquidCrystal/examples/Scroll/Scroll.pde b/hardware/arduino/libraries/LiquidCrystal/examples/Scroll/Scroll.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/Scroll/Scroll.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/Scroll/Scroll.pde diff --git a/hardware/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde b/hardware/arduino/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde diff --git a/hardware/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde b/hardware/arduino/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde diff --git a/hardware/libraries/LiquidCrystal/examples/setCursor/setCursor.pde b/hardware/arduino/libraries/LiquidCrystal/examples/setCursor/setCursor.pde similarity index 100% rename from hardware/libraries/LiquidCrystal/examples/setCursor/setCursor.pde rename to hardware/arduino/libraries/LiquidCrystal/examples/setCursor/setCursor.pde diff --git a/hardware/libraries/LiquidCrystal/keywords.txt b/hardware/arduino/libraries/LiquidCrystal/keywords.txt similarity index 100% rename from hardware/libraries/LiquidCrystal/keywords.txt rename to hardware/arduino/libraries/LiquidCrystal/keywords.txt diff --git a/hardware/libraries/Matrix/Matrix.cpp b/hardware/arduino/libraries/Matrix/Matrix.cpp similarity index 100% rename from hardware/libraries/Matrix/Matrix.cpp rename to hardware/arduino/libraries/Matrix/Matrix.cpp diff --git a/hardware/libraries/Matrix/Matrix.h b/hardware/arduino/libraries/Matrix/Matrix.h similarity index 100% rename from hardware/libraries/Matrix/Matrix.h rename to hardware/arduino/libraries/Matrix/Matrix.h diff --git a/hardware/libraries/Matrix/examples/hello_matrix/hello_matrix.pde b/hardware/arduino/libraries/Matrix/examples/hello_matrix/hello_matrix.pde similarity index 100% rename from hardware/libraries/Matrix/examples/hello_matrix/hello_matrix.pde rename to hardware/arduino/libraries/Matrix/examples/hello_matrix/hello_matrix.pde diff --git a/hardware/libraries/Matrix/examples/sprite_animation/sprite_animation.pde b/hardware/arduino/libraries/Matrix/examples/sprite_animation/sprite_animation.pde similarity index 100% rename from hardware/libraries/Matrix/examples/sprite_animation/sprite_animation.pde rename to hardware/arduino/libraries/Matrix/examples/sprite_animation/sprite_animation.pde diff --git a/hardware/libraries/Matrix/keywords.txt b/hardware/arduino/libraries/Matrix/keywords.txt similarity index 100% rename from hardware/libraries/Matrix/keywords.txt rename to hardware/arduino/libraries/Matrix/keywords.txt diff --git a/hardware/libraries/Servo/Servo.cpp b/hardware/arduino/libraries/Servo/Servo.cpp similarity index 100% rename from hardware/libraries/Servo/Servo.cpp rename to hardware/arduino/libraries/Servo/Servo.cpp diff --git a/hardware/libraries/Servo/Servo.h b/hardware/arduino/libraries/Servo/Servo.h similarity index 100% rename from hardware/libraries/Servo/Servo.h rename to hardware/arduino/libraries/Servo/Servo.h diff --git a/hardware/libraries/Servo/examples/Knob/Knob.pde b/hardware/arduino/libraries/Servo/examples/Knob/Knob.pde similarity index 100% rename from hardware/libraries/Servo/examples/Knob/Knob.pde rename to hardware/arduino/libraries/Servo/examples/Knob/Knob.pde diff --git a/hardware/libraries/Servo/examples/Sweep/Sweep.pde b/hardware/arduino/libraries/Servo/examples/Sweep/Sweep.pde similarity index 100% rename from hardware/libraries/Servo/examples/Sweep/Sweep.pde rename to hardware/arduino/libraries/Servo/examples/Sweep/Sweep.pde diff --git a/hardware/libraries/Servo/keywords.txt b/hardware/arduino/libraries/Servo/keywords.txt similarity index 100% rename from hardware/libraries/Servo/keywords.txt rename to hardware/arduino/libraries/Servo/keywords.txt diff --git a/hardware/libraries/SoftwareSerial/SoftwareSerial.cpp b/hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp similarity index 100% rename from hardware/libraries/SoftwareSerial/SoftwareSerial.cpp rename to hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp diff --git a/hardware/libraries/SoftwareSerial/SoftwareSerial.h b/hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.h similarity index 100% rename from hardware/libraries/SoftwareSerial/SoftwareSerial.h rename to hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.h diff --git a/hardware/libraries/SoftwareSerial/keywords.txt b/hardware/arduino/libraries/SoftwareSerial/keywords.txt similarity index 100% rename from hardware/libraries/SoftwareSerial/keywords.txt rename to hardware/arduino/libraries/SoftwareSerial/keywords.txt diff --git a/hardware/libraries/Sprite/Sprite.cpp b/hardware/arduino/libraries/Sprite/Sprite.cpp similarity index 100% rename from hardware/libraries/Sprite/Sprite.cpp rename to hardware/arduino/libraries/Sprite/Sprite.cpp diff --git a/hardware/libraries/Sprite/Sprite.h b/hardware/arduino/libraries/Sprite/Sprite.h similarity index 100% rename from hardware/libraries/Sprite/Sprite.h rename to hardware/arduino/libraries/Sprite/Sprite.h diff --git a/hardware/libraries/Sprite/binary.h b/hardware/arduino/libraries/Sprite/binary.h similarity index 100% rename from hardware/libraries/Sprite/binary.h rename to hardware/arduino/libraries/Sprite/binary.h diff --git a/hardware/libraries/Sprite/keywords.txt b/hardware/arduino/libraries/Sprite/keywords.txt similarity index 100% rename from hardware/libraries/Sprite/keywords.txt rename to hardware/arduino/libraries/Sprite/keywords.txt diff --git a/hardware/libraries/Stepper/Stepper.cpp b/hardware/arduino/libraries/Stepper/Stepper.cpp similarity index 100% rename from hardware/libraries/Stepper/Stepper.cpp rename to hardware/arduino/libraries/Stepper/Stepper.cpp diff --git a/hardware/libraries/Stepper/Stepper.h b/hardware/arduino/libraries/Stepper/Stepper.h similarity index 100% rename from hardware/libraries/Stepper/Stepper.h rename to hardware/arduino/libraries/Stepper/Stepper.h diff --git a/hardware/libraries/Stepper/examples/MotorKnob/MotorKnob.pde b/hardware/arduino/libraries/Stepper/examples/MotorKnob/MotorKnob.pde similarity index 100% rename from hardware/libraries/Stepper/examples/MotorKnob/MotorKnob.pde rename to hardware/arduino/libraries/Stepper/examples/MotorKnob/MotorKnob.pde diff --git a/hardware/libraries/Stepper/keywords.txt b/hardware/arduino/libraries/Stepper/keywords.txt similarity index 100% rename from hardware/libraries/Stepper/keywords.txt rename to hardware/arduino/libraries/Stepper/keywords.txt diff --git a/hardware/libraries/Wire/Wire.cpp b/hardware/arduino/libraries/Wire/Wire.cpp similarity index 100% rename from hardware/libraries/Wire/Wire.cpp rename to hardware/arduino/libraries/Wire/Wire.cpp diff --git a/hardware/libraries/Wire/Wire.h b/hardware/arduino/libraries/Wire/Wire.h similarity index 100% rename from hardware/libraries/Wire/Wire.h rename to hardware/arduino/libraries/Wire/Wire.h diff --git a/hardware/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde b/hardware/arduino/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde similarity index 100% rename from hardware/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde rename to hardware/arduino/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde diff --git a/hardware/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde b/hardware/arduino/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde similarity index 100% rename from hardware/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde rename to hardware/arduino/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde diff --git a/hardware/libraries/Wire/examples/master_reader/master_reader.pde b/hardware/arduino/libraries/Wire/examples/master_reader/master_reader.pde similarity index 100% rename from hardware/libraries/Wire/examples/master_reader/master_reader.pde rename to hardware/arduino/libraries/Wire/examples/master_reader/master_reader.pde diff --git a/hardware/libraries/Wire/examples/master_writer/master_writer.pde b/hardware/arduino/libraries/Wire/examples/master_writer/master_writer.pde similarity index 100% rename from hardware/libraries/Wire/examples/master_writer/master_writer.pde rename to hardware/arduino/libraries/Wire/examples/master_writer/master_writer.pde diff --git a/hardware/libraries/Wire/examples/slave_receiver/slave_receiver.pde b/hardware/arduino/libraries/Wire/examples/slave_receiver/slave_receiver.pde similarity index 100% rename from hardware/libraries/Wire/examples/slave_receiver/slave_receiver.pde rename to hardware/arduino/libraries/Wire/examples/slave_receiver/slave_receiver.pde diff --git a/hardware/libraries/Wire/examples/slave_sender/slave_sender.pde b/hardware/arduino/libraries/Wire/examples/slave_sender/slave_sender.pde similarity index 100% rename from hardware/libraries/Wire/examples/slave_sender/slave_sender.pde rename to hardware/arduino/libraries/Wire/examples/slave_sender/slave_sender.pde diff --git a/hardware/libraries/Wire/keywords.txt b/hardware/arduino/libraries/Wire/keywords.txt similarity index 100% rename from hardware/libraries/Wire/keywords.txt rename to hardware/arduino/libraries/Wire/keywords.txt diff --git a/hardware/libraries/Wire/utility/twi.c b/hardware/arduino/libraries/Wire/utility/twi.c similarity index 100% rename from hardware/libraries/Wire/utility/twi.c rename to hardware/arduino/libraries/Wire/utility/twi.c diff --git a/hardware/libraries/Wire/utility/twi.h b/hardware/arduino/libraries/Wire/utility/twi.h similarity index 100% rename from hardware/libraries/Wire/utility/twi.h rename to hardware/arduino/libraries/Wire/utility/twi.h From 3075c8e4fda439fea5b5c8838c622338d3f94adc Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 7 Nov 2009 17:54:56 +0000 Subject: [PATCH 4/8] Moving libraries out of arduino platform / core directory and to top-level. --- app/src/processing/app/Base.java | 69 ++++++++++++++++++- app/src/processing/app/Editor.java | 10 +-- app/src/processing/app/Preferences.java | 29 ++------ app/src/processing/app/Sketch.java | 28 ++++---- app/src/processing/app/debug/Compiler.java | 3 +- .../libraries => libraries}/EEPROM/EEPROM.cpp | 0 .../libraries => libraries}/EEPROM/EEPROM.h | 0 .../examples/eeprom_clear/eeprom_clear.pde | 0 .../examples/eeprom_read/eeprom_read.pde | 0 .../examples/eeprom_write/eeprom_write.pde | 0 .../EEPROM/keywords.txt | 0 .../Ethernet/Client.cpp | 0 .../libraries => libraries}/Ethernet/Client.h | 0 .../Ethernet/Ethernet.cpp | 0 .../Ethernet/Ethernet.h | 0 .../Ethernet/Server.cpp | 0 .../libraries => libraries}/Ethernet/Server.h | 0 .../examples/ChatServer/ChatServer.pde | 0 .../Ethernet/examples/WebClient/WebClient.pde | 0 .../Ethernet/examples/WebServer/WebServer.pde | 0 .../Ethernet/keywords.txt | 0 .../Ethernet/utility/socket.c | 0 .../Ethernet/utility/socket.h | 0 .../Ethernet/utility/spi.h | 0 .../Ethernet/utility/types.h | 0 .../Ethernet/utility/w5100.c | 0 .../Ethernet/utility/w5100.h | 0 .../Firmata/Firmata.cpp | 0 .../libraries => libraries}/Firmata/Firmata.h | 0 .../Firmata/LICENSE.txt | 0 .../libraries => libraries}/Firmata/TODO.txt | 0 .../examples/AnalogFirmata/AnalogFirmata.pde | 0 .../Firmata/examples/AnalogFirmata/Makefile | 0 .../examples/EchoString/EchoString.pde | 0 .../Firmata/examples/EchoString/Makefile | 0 .../examples/I2CFirmata/I2CFirmata.pde | 0 .../Firmata/examples/ServoFirmata/Makefile | 0 .../examples/ServoFirmata/ServoFirmata.pde | 0 .../examples/SimpleAnalogFirmata/Makefile | 0 .../SimpleAnalogFirmata.pde | 0 .../examples/SimpleDigitalFirmata/Makefile | 0 .../SimpleDigitalFirmata.pde | 0 .../examples/StandardFirmata/LICENSE.txt | 0 .../Firmata/examples/StandardFirmata/Makefile | 0 .../StandardFirmata/StandardFirmata.pde | 0 .../Firmata/keywords.txt | 0 .../LiquidCrystal/LiquidCrystal.cpp | 0 .../LiquidCrystal/LiquidCrystal.h | 0 .../examples/Autoscroll/Autoscroll.pde | 0 .../LiquidCrystal/examples/Blink/Blink.pde | 0 .../LiquidCrystal/examples/Cursor/Cursor.pde | 0 .../examples/Display/Display.pde | 0 .../examples/HelloWorld/HelloWorld.pde | 0 .../LiquidCrystal/examples/Scroll/Scroll.pde | 0 .../examples/SerialDisplay/SerialDisplay.pde | 0 .../examples/TextDirection/TextDirection.pde | 0 .../examples/setCursor/setCursor.pde | 0 .../LiquidCrystal/keywords.txt | 0 .../libraries => libraries}/Matrix/Matrix.cpp | 0 .../libraries => libraries}/Matrix/Matrix.h | 0 .../examples/hello_matrix/hello_matrix.pde | 0 .../sprite_animation/sprite_animation.pde | 0 .../Matrix/keywords.txt | 0 .../libraries => libraries}/Servo/Servo.cpp | 0 .../libraries => libraries}/Servo/Servo.h | 0 .../Servo/examples/Knob/Knob.pde | 0 .../Servo/examples/Sweep/Sweep.pde | 0 .../Servo/keywords.txt | 0 .../SoftwareSerial/SoftwareSerial.cpp | 0 .../SoftwareSerial/SoftwareSerial.h | 0 .../SoftwareSerial/keywords.txt | 0 .../libraries => libraries}/Sprite/Sprite.cpp | 0 .../libraries => libraries}/Sprite/Sprite.h | 0 .../libraries => libraries}/Sprite/binary.h | 0 .../Sprite/keywords.txt | 0 .../Stepper/Stepper.cpp | 0 .../libraries => libraries}/Stepper/Stepper.h | 0 .../Stepper/examples/MotorKnob/MotorKnob.pde | 0 .../Stepper/keywords.txt | 0 .../libraries => libraries}/Wire/Wire.cpp | 0 .../libraries => libraries}/Wire/Wire.h | 0 .../SFRRanger_reader/SFRRanger_reader.pde | 0 .../digital_potentiometer.pde | 0 .../examples/master_reader/master_reader.pde | 0 .../examples/master_writer/master_writer.pde | 0 .../slave_receiver/slave_receiver.pde | 0 .../examples/slave_sender/slave_sender.pde | 0 .../libraries => libraries}/Wire/keywords.txt | 0 .../Wire/utility/twi.c | 0 .../Wire/utility/twi.h | 0 90 files changed, 91 insertions(+), 48 deletions(-) rename {hardware/arduino/libraries => libraries}/EEPROM/EEPROM.cpp (100%) rename {hardware/arduino/libraries => libraries}/EEPROM/EEPROM.h (100%) rename {hardware/arduino/libraries => libraries}/EEPROM/examples/eeprom_clear/eeprom_clear.pde (100%) rename {hardware/arduino/libraries => libraries}/EEPROM/examples/eeprom_read/eeprom_read.pde (100%) rename {hardware/arduino/libraries => libraries}/EEPROM/examples/eeprom_write/eeprom_write.pde (100%) rename {hardware/arduino/libraries => libraries}/EEPROM/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/Client.cpp (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/Client.h (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/Ethernet.cpp (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/Ethernet.h (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/Server.cpp (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/Server.h (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/examples/ChatServer/ChatServer.pde (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/examples/WebClient/WebClient.pde (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/examples/WebServer/WebServer.pde (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/utility/socket.c (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/utility/socket.h (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/utility/spi.h (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/utility/types.h (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/utility/w5100.c (100%) rename {hardware/arduino/libraries => libraries}/Ethernet/utility/w5100.h (100%) rename {hardware/arduino/libraries => libraries}/Firmata/Firmata.cpp (100%) rename {hardware/arduino/libraries => libraries}/Firmata/Firmata.h (100%) rename {hardware/arduino/libraries => libraries}/Firmata/LICENSE.txt (100%) rename {hardware/arduino/libraries => libraries}/Firmata/TODO.txt (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/AnalogFirmata/AnalogFirmata.pde (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/AnalogFirmata/Makefile (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/EchoString/EchoString.pde (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/EchoString/Makefile (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/I2CFirmata/I2CFirmata.pde (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/ServoFirmata/Makefile (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/ServoFirmata/ServoFirmata.pde (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/SimpleAnalogFirmata/Makefile (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/SimpleDigitalFirmata/Makefile (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/StandardFirmata/LICENSE.txt (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/StandardFirmata/Makefile (100%) rename {hardware/arduino/libraries => libraries}/Firmata/examples/StandardFirmata/StandardFirmata.pde (100%) rename {hardware/arduino/libraries => libraries}/Firmata/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/LiquidCrystal.cpp (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/LiquidCrystal.h (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/Autoscroll/Autoscroll.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/Blink/Blink.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/Cursor/Cursor.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/Display/Display.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/HelloWorld/HelloWorld.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/Scroll/Scroll.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/TextDirection/TextDirection.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/examples/setCursor/setCursor.pde (100%) rename {hardware/arduino/libraries => libraries}/LiquidCrystal/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/Matrix/Matrix.cpp (100%) rename {hardware/arduino/libraries => libraries}/Matrix/Matrix.h (100%) rename {hardware/arduino/libraries => libraries}/Matrix/examples/hello_matrix/hello_matrix.pde (100%) rename {hardware/arduino/libraries => libraries}/Matrix/examples/sprite_animation/sprite_animation.pde (100%) rename {hardware/arduino/libraries => libraries}/Matrix/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/Servo/Servo.cpp (100%) rename {hardware/arduino/libraries => libraries}/Servo/Servo.h (100%) rename {hardware/arduino/libraries => libraries}/Servo/examples/Knob/Knob.pde (100%) rename {hardware/arduino/libraries => libraries}/Servo/examples/Sweep/Sweep.pde (100%) rename {hardware/arduino/libraries => libraries}/Servo/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/SoftwareSerial/SoftwareSerial.cpp (100%) rename {hardware/arduino/libraries => libraries}/SoftwareSerial/SoftwareSerial.h (100%) rename {hardware/arduino/libraries => libraries}/SoftwareSerial/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/Sprite/Sprite.cpp (100%) rename {hardware/arduino/libraries => libraries}/Sprite/Sprite.h (100%) rename {hardware/arduino/libraries => libraries}/Sprite/binary.h (100%) rename {hardware/arduino/libraries => libraries}/Sprite/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/Stepper/Stepper.cpp (100%) rename {hardware/arduino/libraries => libraries}/Stepper/Stepper.h (100%) rename {hardware/arduino/libraries => libraries}/Stepper/examples/MotorKnob/MotorKnob.pde (100%) rename {hardware/arduino/libraries => libraries}/Stepper/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/Wire/Wire.cpp (100%) rename {hardware/arduino/libraries => libraries}/Wire/Wire.h (100%) rename {hardware/arduino/libraries => libraries}/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde (100%) rename {hardware/arduino/libraries => libraries}/Wire/examples/digital_potentiometer/digital_potentiometer.pde (100%) rename {hardware/arduino/libraries => libraries}/Wire/examples/master_reader/master_reader.pde (100%) rename {hardware/arduino/libraries => libraries}/Wire/examples/master_writer/master_writer.pde (100%) rename {hardware/arduino/libraries => libraries}/Wire/examples/slave_receiver/slave_receiver.pde (100%) rename {hardware/arduino/libraries => libraries}/Wire/examples/slave_sender/slave_sender.pde (100%) rename {hardware/arduino/libraries => libraries}/Wire/keywords.txt (100%) rename {hardware/arduino/libraries => libraries}/Wire/utility/twi.c (100%) rename {hardware/arduino/libraries => libraries}/Wire/utility/twi.h (100%) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 4d7e8dd1c..628056d52 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -84,6 +84,8 @@ public class Base { // (both those in the p5/libs folder and those with lib subfolders // found in the sketchbook) static public String librariesClassPath; + + static HashMap platformsTable; // Location for untitled items static File untitledFolder; @@ -275,6 +277,9 @@ public class Base { defaultFolder.mkdirs(); } } + + loadHardware(getHardwareFolder()); + loadHardware(getSketchbookHardwareFolder()); // Check if there were previously opened sketches to be restored boolean opened = restoreSketches(); @@ -985,6 +990,31 @@ public class Base { e.printStackTrace(); } } + + + public void rebuildBoardsMenu(JMenu menu) { + //System.out.println("rebuilding boards menu"); + try { + menu.removeAll(); + ButtonGroup group = new ButtonGroup(); + for (String board : Preferences.getSubKeys("boards")) { + JMenu item = + new JRadioButtonMenuItem( + new AbstractAction(Preferences.get("boards", "board", "name")) { + { putValue("board", board); } + public void actionPerformed(ActionEvent actionevent) { + //System.out.println("Switching to " + board); + Preferences.set("board", getValue("board")); + } + })); + if (board.equals(Preferences.get("board"))) item.setSelected(true); + group.add(item); + menu.add(item); + } + } catch (IOException e) { + e.printStackTrace(); + } + } /** @@ -1138,7 +1168,8 @@ public class Base { // String packages[] = // Compiler.packageListFromClassPath(libraryClassPath); libraries.add(subfolder); - String packages[] = Compiler.headerListFromIncludePath(subfolder.getAbsolutePath()); + String packages[] = + Compiler.headerListFromIncludePath(subfolder.getAbsolutePath()); for (String pkg : packages) { importToLibraryTable.put(pkg, subfolder); } @@ -1162,6 +1193,42 @@ public class Base { } return ifound; } + + + protected boolean loadHardware(File folder) { + if (!folder.isDirectory()) return false; + + String list[] = folder.list(new FilenameFilter() { + public boolean accept(File dir, String name) { + // skip .DS_Store files, .svn folders, etc + if (name.charAt(0) == '.') return false; + if (name.equals("CVS")) return false; + return (new File(dir, name).isDirectory()); + } + }); + // if a bad folder or something like that, this might come back null + if (list == null) return false; + + // alphabetize list, since it's not always alpha order + // replaced hella slow bubble sort with this feller for 0093 + Arrays.sort(list, String.CASE_INSENSITIVE_ORDER); + + for (String platform : list) { + File subfolder = new File(folder, platform); + + File boardsFile = new File(subfolder, "boards.txt"); + if (boardsFile.exists()) { + Preferences.load(new FileInputStream(boardsFile), "boards"); + } + + File programmersFile = new File(subfolder, "programmers.txt"); + if (programmersFile.exists()) { + Preferences.load(new FileInputStream(programmersFile), "programmers"); + } + + platformsTable.put(platform, subfolder); + } + } // ................................................................. diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 193444385..baff66111 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -1842,10 +1842,7 @@ public class Editor extends JFrame implements RunnerListener { SwingUtilities.invokeLater(new Runnable() { public void run() { try { - sketch.compile(new Target( - Base.getHardwarePath() + File.separator + "cores", - Preferences.get("boards." + Preferences.get("board") + ".build.core")), - verbose); + sketch.compile(verbose); statusNotice("Done compiling."); } catch (RunnerException e) { //statusError("Error compiling..."); @@ -2257,10 +2254,7 @@ public class Editor extends JFrame implements RunnerListener { uploading = true; - boolean success = sketch.exportApplet(new Target( - Base.getHardwarePath() + File.separator + "cores", - Preferences.get("boards." + Preferences.get("board") + ".build.core")), - verbose); + boolean success = sketch.exportApplet(verbose); if (success) { statusNotice("Done uploading."); } else { diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index 1bb505373..cb1ba9975 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -198,25 +198,6 @@ public class Preferences { " and restart Arduino.", ex); } } - } - - try { - load(new FileInputStream(new File(Base.getHardwareFolder(), "boards.txt")), - "boards"); - } catch (Exception ex) { - Base.showError("Error reading board definitions", - "Error reading the board definitions file (" + - new File(Base.getHardwareFolder(), "boards.txt").getAbsolutePath() + "). " + - "Please re-download or re-unzip Arduino.\n", ex); - } - - try { - load(new FileInputStream(new File(Base.getHardwareFolder(), "programmers.txt")), - "programmers"); - } catch (Exception ex) { - Base.showError("Error reading programmers definitions", - "Error reading the programmers definitions file. " + - "Please re-download or re-unzip Arduino.\n", ex); } } @@ -570,9 +551,8 @@ public class Preferences { } static protected void load(InputStream input, String prefix) throws IOException { - LinkedHashMap table = new LinkedHashMap(); - prefixes.put(prefix, table); - load(input, table); + if (!prefixes.containsKey(prefix)) prefixes.put(prefix, new LinkedHashMap()); + load(input, (Map) prefixes.get(prefix)); } static protected void load(InputStream input, Map table) throws IOException { @@ -628,6 +608,11 @@ public class Preferences { //static public String get(String attribute) { //return get(attribute, null); //} + + static public String get(String prefix, String selector, String suffix) { + if (get(selector) == null) return null; + return get(prefix + "." + get(selector) + "." + suffix); + } static public String get(String attribute /*, String defaultValue */) { // if the attribute starts with a prefix used by one of our subsidiary diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index 042680018..a27ba72ed 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -27,7 +27,6 @@ import processing.app.debug.AvrdudeUploader; import processing.app.debug.Compiler; import processing.app.debug.RunnerException; import processing.app.debug.Sizer; -import processing.app.debug.Target; import processing.app.debug.Uploader; import processing.app.preproc.*; import processing.core.*; @@ -1142,7 +1141,7 @@ public class Sketch { * X. afterwards, some of these steps need a cleanup function * */ - protected String compile(Target target, boolean verbose) + protected String compile(boolean verbose) throws RunnerException { String name; @@ -1177,7 +1176,7 @@ public class Sketch { cleanup(); // handle preprocessing the main file's code - name = build(tempBuildFolder.getAbsolutePath(), target, verbose); + name = build(tempBuildFolder.getAbsolutePath(), verbose); size(tempBuildFolder.getAbsolutePath(), name); return name; @@ -1199,11 +1198,11 @@ public class Sketch { * @param buildPath Location to copy all the .java files * @return null if compilation failed, main class name if not */ - public String preprocess(String buildPath, Target target) throws RunnerException { - return preprocess(buildPath, new PdePreprocessor(), target); + public String preprocess(String buildPath) throws RunnerException { + return preprocess(buildPath, new PdePreprocessor()); } - public String preprocess(String buildPath, PdePreprocessor preprocessor, Target target) throws RunnerException { + public String preprocess(String buildPath, PdePreprocessor preprocessor) throws RunnerException { // make sure the user didn't hide the sketch folder ensureExistence(); @@ -1279,8 +1278,7 @@ public class Sketch { headerOffset = preprocessor.writePrefix(bigCode.toString(), buildPath, name, - codeFolderPackages, - target); + codeFolderPackages); } catch (FileNotFoundException fnfe) { fnfe.printStackTrace(); String msg = "Build folder disappeared or could not be written"; @@ -1378,31 +1376,31 @@ public class Sketch { * * @return null if compilation failed, main class name if not */ - public String build(String buildPath, Target target, boolean verbose) + public String build(String buildPath, boolean verbose) throws RunnerException { // run the preprocessor - String primaryClassName = preprocess(buildPath, target); + String primaryClassName = preprocess(buildPath); // compile the program. errors will happen as a RunnerException // that will bubble up to whomever called build(). Compiler compiler = new Compiler(); - if (compiler.compile(this, buildPath, primaryClassName, target, verbose)) { + if (compiler.compile(this, buildPath, primaryClassName, verbose)) { return primaryClassName; } return null; } - protected boolean exportApplet(Target target, boolean verbose) throws Exception { - return exportApplet(new File(folder, "applet").getAbsolutePath(), target, verbose); + protected boolean exportApplet(boolean verbose) throws Exception { + return exportApplet(new File(folder, "applet").getAbsolutePath(), verbose); } /** * Handle export to applet. */ - public boolean exportApplet(String appletPath, Target target, boolean verbose) + public boolean exportApplet(String appletPath, boolean verbose) throws RunnerException, IOException { // Make sure the user didn't hide the sketch folder @@ -1426,7 +1424,7 @@ public class Sketch { appletFolder.mkdirs(); // build the sketch - String foundName = build(appletFolder.getPath(), target, false); + String foundName = build(appletFolder.getPath(), false); // (already reported) error during export, exit this function if (foundName == null) return false; diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 198fd9847..bd69c9575 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -55,14 +55,12 @@ public class Compiler implements MessageConsumer { * @param sketch Sketch object to be compiled. * @param buildPath Where the temporary files live and will be built from. * @param primaryClassName the name of the combined sketch file w/ extension - * @param target the target (core) to build against * @return true if successful. * @throws RunnerException Only if there's a problem. Only then. */ public boolean compile(Sketch sketch, String buildPath, String primaryClassName, - Target target, boolean verbose) throws RunnerException { this.sketch = sketch; this.buildPath = buildPath; @@ -73,6 +71,7 @@ public class Compiler implements MessageConsumer { MessageStream pms = new MessageStream(this); String avrBasePath = Base.getAvrBasePath(); + String corePath = Preferences.get("boards", "board", "build.core"); List objectFiles = new ArrayList(); diff --git a/hardware/arduino/libraries/EEPROM/EEPROM.cpp b/libraries/EEPROM/EEPROM.cpp similarity index 100% rename from hardware/arduino/libraries/EEPROM/EEPROM.cpp rename to libraries/EEPROM/EEPROM.cpp diff --git a/hardware/arduino/libraries/EEPROM/EEPROM.h b/libraries/EEPROM/EEPROM.h similarity index 100% rename from hardware/arduino/libraries/EEPROM/EEPROM.h rename to libraries/EEPROM/EEPROM.h diff --git a/hardware/arduino/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde b/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde similarity index 100% rename from hardware/arduino/libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde rename to libraries/EEPROM/examples/eeprom_clear/eeprom_clear.pde diff --git a/hardware/arduino/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde b/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde similarity index 100% rename from hardware/arduino/libraries/EEPROM/examples/eeprom_read/eeprom_read.pde rename to libraries/EEPROM/examples/eeprom_read/eeprom_read.pde diff --git a/hardware/arduino/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde b/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde similarity index 100% rename from hardware/arduino/libraries/EEPROM/examples/eeprom_write/eeprom_write.pde rename to libraries/EEPROM/examples/eeprom_write/eeprom_write.pde diff --git a/hardware/arduino/libraries/EEPROM/keywords.txt b/libraries/EEPROM/keywords.txt similarity index 100% rename from hardware/arduino/libraries/EEPROM/keywords.txt rename to libraries/EEPROM/keywords.txt diff --git a/hardware/arduino/libraries/Ethernet/Client.cpp b/libraries/Ethernet/Client.cpp similarity index 100% rename from hardware/arduino/libraries/Ethernet/Client.cpp rename to libraries/Ethernet/Client.cpp diff --git a/hardware/arduino/libraries/Ethernet/Client.h b/libraries/Ethernet/Client.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/Client.h rename to libraries/Ethernet/Client.h diff --git a/hardware/arduino/libraries/Ethernet/Ethernet.cpp b/libraries/Ethernet/Ethernet.cpp similarity index 100% rename from hardware/arduino/libraries/Ethernet/Ethernet.cpp rename to libraries/Ethernet/Ethernet.cpp diff --git a/hardware/arduino/libraries/Ethernet/Ethernet.h b/libraries/Ethernet/Ethernet.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/Ethernet.h rename to libraries/Ethernet/Ethernet.h diff --git a/hardware/arduino/libraries/Ethernet/Server.cpp b/libraries/Ethernet/Server.cpp similarity index 100% rename from hardware/arduino/libraries/Ethernet/Server.cpp rename to libraries/Ethernet/Server.cpp diff --git a/hardware/arduino/libraries/Ethernet/Server.h b/libraries/Ethernet/Server.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/Server.h rename to libraries/Ethernet/Server.h diff --git a/hardware/arduino/libraries/Ethernet/examples/ChatServer/ChatServer.pde b/libraries/Ethernet/examples/ChatServer/ChatServer.pde similarity index 100% rename from hardware/arduino/libraries/Ethernet/examples/ChatServer/ChatServer.pde rename to libraries/Ethernet/examples/ChatServer/ChatServer.pde diff --git a/hardware/arduino/libraries/Ethernet/examples/WebClient/WebClient.pde b/libraries/Ethernet/examples/WebClient/WebClient.pde similarity index 100% rename from hardware/arduino/libraries/Ethernet/examples/WebClient/WebClient.pde rename to libraries/Ethernet/examples/WebClient/WebClient.pde diff --git a/hardware/arduino/libraries/Ethernet/examples/WebServer/WebServer.pde b/libraries/Ethernet/examples/WebServer/WebServer.pde similarity index 100% rename from hardware/arduino/libraries/Ethernet/examples/WebServer/WebServer.pde rename to libraries/Ethernet/examples/WebServer/WebServer.pde diff --git a/hardware/arduino/libraries/Ethernet/keywords.txt b/libraries/Ethernet/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Ethernet/keywords.txt rename to libraries/Ethernet/keywords.txt diff --git a/hardware/arduino/libraries/Ethernet/utility/socket.c b/libraries/Ethernet/utility/socket.c similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/socket.c rename to libraries/Ethernet/utility/socket.c diff --git a/hardware/arduino/libraries/Ethernet/utility/socket.h b/libraries/Ethernet/utility/socket.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/socket.h rename to libraries/Ethernet/utility/socket.h diff --git a/hardware/arduino/libraries/Ethernet/utility/spi.h b/libraries/Ethernet/utility/spi.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/spi.h rename to libraries/Ethernet/utility/spi.h diff --git a/hardware/arduino/libraries/Ethernet/utility/types.h b/libraries/Ethernet/utility/types.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/types.h rename to libraries/Ethernet/utility/types.h diff --git a/hardware/arduino/libraries/Ethernet/utility/w5100.c b/libraries/Ethernet/utility/w5100.c similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/w5100.c rename to libraries/Ethernet/utility/w5100.c diff --git a/hardware/arduino/libraries/Ethernet/utility/w5100.h b/libraries/Ethernet/utility/w5100.h similarity index 100% rename from hardware/arduino/libraries/Ethernet/utility/w5100.h rename to libraries/Ethernet/utility/w5100.h diff --git a/hardware/arduino/libraries/Firmata/Firmata.cpp b/libraries/Firmata/Firmata.cpp similarity index 100% rename from hardware/arduino/libraries/Firmata/Firmata.cpp rename to libraries/Firmata/Firmata.cpp diff --git a/hardware/arduino/libraries/Firmata/Firmata.h b/libraries/Firmata/Firmata.h similarity index 100% rename from hardware/arduino/libraries/Firmata/Firmata.h rename to libraries/Firmata/Firmata.h diff --git a/hardware/arduino/libraries/Firmata/LICENSE.txt b/libraries/Firmata/LICENSE.txt similarity index 100% rename from hardware/arduino/libraries/Firmata/LICENSE.txt rename to libraries/Firmata/LICENSE.txt diff --git a/hardware/arduino/libraries/Firmata/TODO.txt b/libraries/Firmata/TODO.txt similarity index 100% rename from hardware/arduino/libraries/Firmata/TODO.txt rename to libraries/Firmata/TODO.txt diff --git a/hardware/arduino/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde b/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde rename to libraries/Firmata/examples/AnalogFirmata/AnalogFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/AnalogFirmata/Makefile b/libraries/Firmata/examples/AnalogFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/AnalogFirmata/Makefile rename to libraries/Firmata/examples/AnalogFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/EchoString/EchoString.pde b/libraries/Firmata/examples/EchoString/EchoString.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/EchoString/EchoString.pde rename to libraries/Firmata/examples/EchoString/EchoString.pde diff --git a/hardware/arduino/libraries/Firmata/examples/EchoString/Makefile b/libraries/Firmata/examples/EchoString/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/EchoString/Makefile rename to libraries/Firmata/examples/EchoString/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde b/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde rename to libraries/Firmata/examples/I2CFirmata/I2CFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/ServoFirmata/Makefile b/libraries/Firmata/examples/ServoFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/ServoFirmata/Makefile rename to libraries/Firmata/examples/ServoFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde b/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde rename to libraries/Firmata/examples/ServoFirmata/ServoFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile b/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/Makefile rename to libraries/Firmata/examples/SimpleAnalogFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde b/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde rename to libraries/Firmata/examples/SimpleAnalogFirmata/SimpleAnalogFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile b/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/Makefile rename to libraries/Firmata/examples/SimpleDigitalFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde b/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde rename to libraries/Firmata/examples/SimpleDigitalFirmata/SimpleDigitalFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/examples/StandardFirmata/LICENSE.txt b/libraries/Firmata/examples/StandardFirmata/LICENSE.txt similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/StandardFirmata/LICENSE.txt rename to libraries/Firmata/examples/StandardFirmata/LICENSE.txt diff --git a/hardware/arduino/libraries/Firmata/examples/StandardFirmata/Makefile b/libraries/Firmata/examples/StandardFirmata/Makefile similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/StandardFirmata/Makefile rename to libraries/Firmata/examples/StandardFirmata/Makefile diff --git a/hardware/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde b/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde similarity index 100% rename from hardware/arduino/libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde rename to libraries/Firmata/examples/StandardFirmata/StandardFirmata.pde diff --git a/hardware/arduino/libraries/Firmata/keywords.txt b/libraries/Firmata/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Firmata/keywords.txt rename to libraries/Firmata/keywords.txt diff --git a/hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.cpp b/libraries/LiquidCrystal/LiquidCrystal.cpp similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.cpp rename to libraries/LiquidCrystal/LiquidCrystal.cpp diff --git a/hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.h b/libraries/LiquidCrystal/LiquidCrystal.h similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/LiquidCrystal.h rename to libraries/LiquidCrystal/LiquidCrystal.h diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde b/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde rename to libraries/LiquidCrystal/examples/Autoscroll/Autoscroll.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Blink/Blink.pde b/libraries/LiquidCrystal/examples/Blink/Blink.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Blink/Blink.pde rename to libraries/LiquidCrystal/examples/Blink/Blink.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Cursor/Cursor.pde b/libraries/LiquidCrystal/examples/Cursor/Cursor.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Cursor/Cursor.pde rename to libraries/LiquidCrystal/examples/Cursor/Cursor.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Display/Display.pde b/libraries/LiquidCrystal/examples/Display/Display.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Display/Display.pde rename to libraries/LiquidCrystal/examples/Display/Display.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde b/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde rename to libraries/LiquidCrystal/examples/HelloWorld/HelloWorld.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/Scroll/Scroll.pde b/libraries/LiquidCrystal/examples/Scroll/Scroll.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/Scroll/Scroll.pde rename to libraries/LiquidCrystal/examples/Scroll/Scroll.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde b/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde rename to libraries/LiquidCrystal/examples/SerialDisplay/SerialDisplay.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde b/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde rename to libraries/LiquidCrystal/examples/TextDirection/TextDirection.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/examples/setCursor/setCursor.pde b/libraries/LiquidCrystal/examples/setCursor/setCursor.pde similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/examples/setCursor/setCursor.pde rename to libraries/LiquidCrystal/examples/setCursor/setCursor.pde diff --git a/hardware/arduino/libraries/LiquidCrystal/keywords.txt b/libraries/LiquidCrystal/keywords.txt similarity index 100% rename from hardware/arduino/libraries/LiquidCrystal/keywords.txt rename to libraries/LiquidCrystal/keywords.txt diff --git a/hardware/arduino/libraries/Matrix/Matrix.cpp b/libraries/Matrix/Matrix.cpp similarity index 100% rename from hardware/arduino/libraries/Matrix/Matrix.cpp rename to libraries/Matrix/Matrix.cpp diff --git a/hardware/arduino/libraries/Matrix/Matrix.h b/libraries/Matrix/Matrix.h similarity index 100% rename from hardware/arduino/libraries/Matrix/Matrix.h rename to libraries/Matrix/Matrix.h diff --git a/hardware/arduino/libraries/Matrix/examples/hello_matrix/hello_matrix.pde b/libraries/Matrix/examples/hello_matrix/hello_matrix.pde similarity index 100% rename from hardware/arduino/libraries/Matrix/examples/hello_matrix/hello_matrix.pde rename to libraries/Matrix/examples/hello_matrix/hello_matrix.pde diff --git a/hardware/arduino/libraries/Matrix/examples/sprite_animation/sprite_animation.pde b/libraries/Matrix/examples/sprite_animation/sprite_animation.pde similarity index 100% rename from hardware/arduino/libraries/Matrix/examples/sprite_animation/sprite_animation.pde rename to libraries/Matrix/examples/sprite_animation/sprite_animation.pde diff --git a/hardware/arduino/libraries/Matrix/keywords.txt b/libraries/Matrix/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Matrix/keywords.txt rename to libraries/Matrix/keywords.txt diff --git a/hardware/arduino/libraries/Servo/Servo.cpp b/libraries/Servo/Servo.cpp similarity index 100% rename from hardware/arduino/libraries/Servo/Servo.cpp rename to libraries/Servo/Servo.cpp diff --git a/hardware/arduino/libraries/Servo/Servo.h b/libraries/Servo/Servo.h similarity index 100% rename from hardware/arduino/libraries/Servo/Servo.h rename to libraries/Servo/Servo.h diff --git a/hardware/arduino/libraries/Servo/examples/Knob/Knob.pde b/libraries/Servo/examples/Knob/Knob.pde similarity index 100% rename from hardware/arduino/libraries/Servo/examples/Knob/Knob.pde rename to libraries/Servo/examples/Knob/Knob.pde diff --git a/hardware/arduino/libraries/Servo/examples/Sweep/Sweep.pde b/libraries/Servo/examples/Sweep/Sweep.pde similarity index 100% rename from hardware/arduino/libraries/Servo/examples/Sweep/Sweep.pde rename to libraries/Servo/examples/Sweep/Sweep.pde diff --git a/hardware/arduino/libraries/Servo/keywords.txt b/libraries/Servo/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Servo/keywords.txt rename to libraries/Servo/keywords.txt diff --git a/hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp b/libraries/SoftwareSerial/SoftwareSerial.cpp similarity index 100% rename from hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.cpp rename to libraries/SoftwareSerial/SoftwareSerial.cpp diff --git a/hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.h b/libraries/SoftwareSerial/SoftwareSerial.h similarity index 100% rename from hardware/arduino/libraries/SoftwareSerial/SoftwareSerial.h rename to libraries/SoftwareSerial/SoftwareSerial.h diff --git a/hardware/arduino/libraries/SoftwareSerial/keywords.txt b/libraries/SoftwareSerial/keywords.txt similarity index 100% rename from hardware/arduino/libraries/SoftwareSerial/keywords.txt rename to libraries/SoftwareSerial/keywords.txt diff --git a/hardware/arduino/libraries/Sprite/Sprite.cpp b/libraries/Sprite/Sprite.cpp similarity index 100% rename from hardware/arduino/libraries/Sprite/Sprite.cpp rename to libraries/Sprite/Sprite.cpp diff --git a/hardware/arduino/libraries/Sprite/Sprite.h b/libraries/Sprite/Sprite.h similarity index 100% rename from hardware/arduino/libraries/Sprite/Sprite.h rename to libraries/Sprite/Sprite.h diff --git a/hardware/arduino/libraries/Sprite/binary.h b/libraries/Sprite/binary.h similarity index 100% rename from hardware/arduino/libraries/Sprite/binary.h rename to libraries/Sprite/binary.h diff --git a/hardware/arduino/libraries/Sprite/keywords.txt b/libraries/Sprite/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Sprite/keywords.txt rename to libraries/Sprite/keywords.txt diff --git a/hardware/arduino/libraries/Stepper/Stepper.cpp b/libraries/Stepper/Stepper.cpp similarity index 100% rename from hardware/arduino/libraries/Stepper/Stepper.cpp rename to libraries/Stepper/Stepper.cpp diff --git a/hardware/arduino/libraries/Stepper/Stepper.h b/libraries/Stepper/Stepper.h similarity index 100% rename from hardware/arduino/libraries/Stepper/Stepper.h rename to libraries/Stepper/Stepper.h diff --git a/hardware/arduino/libraries/Stepper/examples/MotorKnob/MotorKnob.pde b/libraries/Stepper/examples/MotorKnob/MotorKnob.pde similarity index 100% rename from hardware/arduino/libraries/Stepper/examples/MotorKnob/MotorKnob.pde rename to libraries/Stepper/examples/MotorKnob/MotorKnob.pde diff --git a/hardware/arduino/libraries/Stepper/keywords.txt b/libraries/Stepper/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Stepper/keywords.txt rename to libraries/Stepper/keywords.txt diff --git a/hardware/arduino/libraries/Wire/Wire.cpp b/libraries/Wire/Wire.cpp similarity index 100% rename from hardware/arduino/libraries/Wire/Wire.cpp rename to libraries/Wire/Wire.cpp diff --git a/hardware/arduino/libraries/Wire/Wire.h b/libraries/Wire/Wire.h similarity index 100% rename from hardware/arduino/libraries/Wire/Wire.h rename to libraries/Wire/Wire.h diff --git a/hardware/arduino/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde b/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde rename to libraries/Wire/examples/SFRRanger_reader/SFRRanger_reader.pde diff --git a/hardware/arduino/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde b/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde rename to libraries/Wire/examples/digital_potentiometer/digital_potentiometer.pde diff --git a/hardware/arduino/libraries/Wire/examples/master_reader/master_reader.pde b/libraries/Wire/examples/master_reader/master_reader.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/master_reader/master_reader.pde rename to libraries/Wire/examples/master_reader/master_reader.pde diff --git a/hardware/arduino/libraries/Wire/examples/master_writer/master_writer.pde b/libraries/Wire/examples/master_writer/master_writer.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/master_writer/master_writer.pde rename to libraries/Wire/examples/master_writer/master_writer.pde diff --git a/hardware/arduino/libraries/Wire/examples/slave_receiver/slave_receiver.pde b/libraries/Wire/examples/slave_receiver/slave_receiver.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/slave_receiver/slave_receiver.pde rename to libraries/Wire/examples/slave_receiver/slave_receiver.pde diff --git a/hardware/arduino/libraries/Wire/examples/slave_sender/slave_sender.pde b/libraries/Wire/examples/slave_sender/slave_sender.pde similarity index 100% rename from hardware/arduino/libraries/Wire/examples/slave_sender/slave_sender.pde rename to libraries/Wire/examples/slave_sender/slave_sender.pde diff --git a/hardware/arduino/libraries/Wire/keywords.txt b/libraries/Wire/keywords.txt similarity index 100% rename from hardware/arduino/libraries/Wire/keywords.txt rename to libraries/Wire/keywords.txt diff --git a/hardware/arduino/libraries/Wire/utility/twi.c b/libraries/Wire/utility/twi.c similarity index 100% rename from hardware/arduino/libraries/Wire/utility/twi.c rename to libraries/Wire/utility/twi.c diff --git a/hardware/arduino/libraries/Wire/utility/twi.h b/libraries/Wire/utility/twi.h similarity index 100% rename from hardware/arduino/libraries/Wire/utility/twi.h rename to libraries/Wire/utility/twi.h From e5b5f254762ae01e5559822ee6bb9a76578e9ee5 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 7 Nov 2009 18:56:45 +0000 Subject: [PATCH 5/8] Third-party cores seems to sort of work now, but burning bootloaders is probably broken. Need to decide on the format for the boards.txt file. --- app/src/processing/app/Base.java | 88 +++++++++++++------ app/src/processing/app/Editor.java | 44 +--------- app/src/processing/app/Preferences.java | 4 +- app/src/processing/app/debug/Compiler.java | 20 +++-- .../app/preproc/PdePreprocessor.java | 26 +----- build/macosx/make.sh | 4 +- hardware/arduino/core/{main.cxx => main.cpp} | 2 + 7 files changed, 82 insertions(+), 106 deletions(-) rename hardware/arduino/core/{main.cxx => main.cpp} (78%) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 628056d52..58bee2355 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -85,7 +85,7 @@ public class Base { // found in the sketchbook) static public String librariesClassPath; - static HashMap platformsTable; + static public HashMap platformsTable; // Location for untitled items static File untitledFolder; @@ -248,7 +248,7 @@ public class Base { // Get paths for the libraries and examples in the Processing folder //String workingDirectory = System.getProperty("user.dir"); examplesFolder = getContentFile("examples"); - librariesFolder = new File(getContentFile("hardware"), "libraries"); + librariesFolder = getContentFile("libraries"); toolsFolder = getContentFile("tools"); // Get the sketchbook path, and make sure it's set properly @@ -278,6 +278,7 @@ public class Base { } } + platformsTable = new HashMap(); loadHardware(getHardwareFolder()); loadHardware(getSketchbookHardwareFolder()); @@ -994,25 +995,39 @@ public class Base { public void rebuildBoardsMenu(JMenu menu) { //System.out.println("rebuilding boards menu"); - try { - menu.removeAll(); - ButtonGroup group = new ButtonGroup(); - for (String board : Preferences.getSubKeys("boards")) { - JMenu item = - new JRadioButtonMenuItem( - new AbstractAction(Preferences.get("boards", "board", "name")) { - { putValue("board", board); } - public void actionPerformed(ActionEvent actionevent) { - //System.out.println("Switching to " + board); - Preferences.set("board", getValue("board")); - } - })); - if (board.equals(Preferences.get("board"))) item.setSelected(true); - group.add(item); - menu.add(item); - } - } catch (IOException e) { - e.printStackTrace(); + menu.removeAll(); + ButtonGroup group = new ButtonGroup(); + for (String board : Preferences.getSubKeys("boards")) { + AbstractAction action = + new AbstractAction(Preferences.get("boards." + board + ".name")) { + public void actionPerformed(ActionEvent actionevent) { + //System.out.println("Switching to " + board); + Preferences.set("board", (String) getValue("board")); + } + }; + action.putValue("board", board); + JMenuItem item = new JRadioButtonMenuItem(action); + if (board.equals(Preferences.get("board"))) item.setSelected(true); + group.add(item); + menu.add(item); + } + } + + + public void rebuildBurnBootloaderMenu(JMenu menu) { + //System.out.println("rebuilding burn bootloader menu"); + menu.removeAll(); + for (String programmer : Preferences.getSubKeys("programmers")) { + AbstractAction action = + new AbstractAction( + "w/ " + Preferences.get("programmers." + programmer + ".name")) { + public void actionPerformed(ActionEvent actionevent) { + activeEditor.handleBurnBootloader((String) getValue("programmer")); + } + }; + action.putValue("programmer", programmer); + JMenuItem item = new JMenuItem(action); + menu.add(item); } } @@ -1195,8 +1210,8 @@ public class Base { } - protected boolean loadHardware(File folder) { - if (!folder.isDirectory()) return false; + protected void loadHardware(File folder) { + if (!folder.isDirectory()) return; String list[] = folder.list(new FilenameFilter() { public boolean accept(File dir, String name) { @@ -1207,7 +1222,7 @@ public class Base { } }); // if a bad folder or something like that, this might come back null - if (list == null) return false; + if (list == null) return; // alphabetize list, since it's not always alpha order // replaced hella slow bubble sort with this feller for 0093 @@ -1217,13 +1232,23 @@ public class Base { File subfolder = new File(folder, platform); File boardsFile = new File(subfolder, "boards.txt"); - if (boardsFile.exists()) { - Preferences.load(new FileInputStream(boardsFile), "boards"); + try { + if (boardsFile.exists()) { + Preferences.load(new FileInputStream(boardsFile), "boards"); + } + } catch (Exception e) { + System.err.println("Error loading boards from " + + boardsFile + ": " + e); } - + File programmersFile = new File(subfolder, "programmers.txt"); - if (programmersFile.exists()) { - Preferences.load(new FileInputStream(programmersFile), "programmers"); + try { + if (programmersFile.exists()) { + Preferences.load(new FileInputStream(programmersFile), "programmers"); + } + } catch (Exception e) { + System.err.println("Error loading programmers from " + + programmersFile + ": " + e); } platformsTable.put(platform, subfolder); @@ -1513,6 +1538,11 @@ public class Base { static public String getSketchbookLibrariesPath() { return getSketchbookLibrariesFolder().getAbsolutePath(); } + + + static public File getSketchbookHardwareFolder() { + return new File(getSketchbookFolder(), "hardware"); + } protected File getDefaultSketchbookFolder() { diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index baff66111..355dca9d4 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -706,16 +706,7 @@ public class Editor extends JFrame implements RunnerListener { if (boardsMenu == null) { boardsMenu = new JMenu("Board"); - ButtonGroup boardGroup = new ButtonGroup(); - for (Iterator i = Preferences.getSubKeys("boards"); i.hasNext(); ) { - String board = (String) i.next(); - Action action = new BoardMenuAction(board); - item = new JRadioButtonMenuItem(action); - if (board.equals(Preferences.get("board"))) - item.setSelected(true); - boardGroup.add(item); - boardsMenu.add(item); - } + base.rebuildBoardsMenu(boardsMenu); } menu.add(boardsMenu); @@ -727,14 +718,9 @@ public class Editor extends JFrame implements RunnerListener { menu.add(serialMenu); menu.addSeparator(); - + JMenu bootloaderMenu = new JMenu("Burn Bootloader"); - for (Iterator i = Preferences.getSubKeys("programmers"); i.hasNext(); ) { - String programmer = (String) i.next(); - Action action = new BootloaderMenuAction(programmer); - item = new JMenuItem(action); - bootloaderMenu.add(item); - } + base.rebuildBurnBootloaderMenu(bootloaderMenu); menu.add(bootloaderMenu); menu.addMenuListener(new MenuListener() { @@ -964,30 +950,6 @@ public class Editor extends JFrame implements RunnerListener { } - class BoardMenuAction extends AbstractAction { - private String board; - public BoardMenuAction(String board) { - super(Preferences.get("boards." + board + ".name")); - this.board = board; - } - public void actionPerformed(ActionEvent actionevent) { - //System.out.println("Switching to " + board); - Preferences.set("board", board); - } - } - - class BootloaderMenuAction extends AbstractAction { - private String programmer; - public BootloaderMenuAction(String programmer) { - super("w/ " + Preferences.get("programmers." + programmer + ".name")); - this.programmer = programmer; - } - public void actionPerformed(ActionEvent actionevent) { - handleBurnBootloader(programmer); - } - } - - protected void populateSerialMenu() { // getting list of ports diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index cb1ba9975..003804f0a 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -647,7 +647,7 @@ public class Preferences { * baz.count=3 * this will return { "foo", "bar", "baz" }. */ - static public Iterator getSubKeys(String prefix) { + static public Set getSubKeys(String prefix) { if (!prefixes.containsKey(prefix)) return null; Set subkeys = new LinkedHashSet(); @@ -657,7 +657,7 @@ public class Preferences { subkey = subkey.substring(0, subkey.indexOf('.')); subkeys.add(subkey); } - return subkeys.iterator(); + return subkeys; } diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index bd69c9575..0a099405e 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -71,23 +71,25 @@ public class Compiler implements MessageConsumer { MessageStream pms = new MessageStream(this); String avrBasePath = Base.getAvrBasePath(); - String corePath = Preferences.get("boards", "board", "build.core"); + String platform = Preferences.get("boards", "board", "build.core"); + File platformFile = Base.platformsTable.get(platform); + String corePath = new File(platformFile, "core").getAbsolutePath(); List objectFiles = new ArrayList(); List includePaths = new ArrayList(); - includePaths.add(target.getPath()); + includePaths.add(corePath); String runtimeLibraryName = buildPath + File.separator + "core.a"; - // 1. compile the target (core), outputting .o files to and - // then collecting them into the core.a library file. + // 1. compile the core, outputting .o files to and then + // collecting them into the core.a library file. - List targetObjectFiles = + List coreObjectFiles = compileFiles(avrBasePath, buildPath, includePaths, - findFilesInPath(target.getPath(), "S", true), - findFilesInPath(target.getPath(), "c", true), - findFilesInPath(target.getPath(), "cpp", true)); + findFilesInPath(corePath, "S", true), + findFilesInPath(corePath, "c", true), + findFilesInPath(corePath, "cpp", true)); List baseCommandAR = new ArrayList(Arrays.asList(new String[] { avrBasePath + "avr-ar", @@ -95,7 +97,7 @@ public class Compiler implements MessageConsumer { runtimeLibraryName })); - for(File file : targetObjectFiles) { + for(File file : coreObjectFiles) { List commandAR = new ArrayList(baseCommandAR); commandAR.add(file.getAbsolutePath()); execAsynchronously(commandAR); diff --git a/app/src/processing/app/preproc/PdePreprocessor.java b/app/src/processing/app/preproc/PdePreprocessor.java index c2e38cd50..b00b7cb03 100644 --- a/app/src/processing/app/preproc/PdePreprocessor.java +++ b/app/src/processing/app/preproc/PdePreprocessor.java @@ -30,7 +30,6 @@ package processing.app.preproc; import processing.app.*; -import processing.app.debug.Target; import processing.core.*; import java.io.*; @@ -50,7 +49,6 @@ public class PdePreprocessor { // we always write one header: WProgram.h public int headerCount = 1; - Target target; List prototypes; @@ -82,12 +80,10 @@ public class PdePreprocessor { public PdePreprocessor() { } public int writePrefix(String program, String buildPath, - String name, String codeFolderPackages[], - Target target) + String name, String codeFolderPackages[]) throws FileNotFoundException { this.buildPath = buildPath; this.name = name; - this.target = target; int tabSize = Preferences.getInteger("editor.tabs.size"); char[] indentChars = new char[tabSize]; @@ -196,7 +192,7 @@ public class PdePreprocessor { // String extraImports[]) throws java.lang.Exception { public String write() throws java.lang.Exception { writeProgram(stream, program, prototypes); - writeFooter(stream, target); + writeFooter(stream); stream.close(); return name; @@ -223,23 +219,7 @@ public class PdePreprocessor { * * @param out PrintStream to write it to. */ - protected void writeFooter(PrintStream out, Target target) throws java.lang.Exception { - // Open the file main.cxx and copy its entire contents to the bottom of the - // generated sketch .cpp file... - - String mainFileName = target.getPath() + File.separator + "main.cxx"; - FileReader reader = null; - reader = new FileReader(mainFileName); - - LineNumberReader mainfile = new LineNumberReader(reader); - - String line; - while ((line = mainfile.readLine()) != null) { - out.print(line + "\n"); - } - - mainfile.close(); - } + protected void writeFooter(PrintStream out) throws java.lang.Exception {} public ArrayList getExtraImports() { diff --git a/build/macosx/make.sh b/build/macosx/make.sh index 6b247d839..12601e0b5 100755 --- a/build/macosx/make.sh +++ b/build/macosx/make.sh @@ -36,7 +36,7 @@ else chmod +x work/Arduino.app/Contents/MacOS/JavaApplicationStub cp -rX ../shared/lib "$RESOURCES/" - cp -rX ../shared/libraries "$RESOURCES/" + cp -rX ../../libraries "$RESOURCES/" cp -rX ../shared/tools "$RESOURCES/" cp -rX ../../hardware "$RESOURCES/" @@ -126,4 +126,4 @@ cd ../.. echo -echo Done. \ No newline at end of file +echo Done. diff --git a/hardware/arduino/core/main.cxx b/hardware/arduino/core/main.cpp similarity index 78% rename from hardware/arduino/core/main.cxx rename to hardware/arduino/core/main.cpp index 52351e4c9..cc6e81d90 100755 --- a/hardware/arduino/core/main.cxx +++ b/hardware/arduino/core/main.cpp @@ -1,3 +1,5 @@ +#include + int main(void) { init(); From 8720addcba3b1417edc3a34b34e2981e11f82a8a Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sun, 8 Nov 2009 20:51:41 +0000 Subject: [PATCH 6/8] Got bootloader burning working. Wrapped some long lines. --- .../processing/app/debug/AvrdudeUploader.java | 35 +++++++++++-------- app/src/processing/app/debug/Compiler.java | 29 ++++++++------- 2 files changed, 37 insertions(+), 27 deletions(-) diff --git a/app/src/processing/app/debug/AvrdudeUploader.java b/app/src/processing/app/debug/AvrdudeUploader.java index 61c0c3f4f..27b5fecd1 100755 --- a/app/src/processing/app/debug/AvrdudeUploader.java +++ b/app/src/processing/app/debug/AvrdudeUploader.java @@ -45,7 +45,8 @@ public class AvrdudeUploader extends Uploader { public boolean uploadUsingPreferences(String buildPath, String className, boolean verbose) throws RunnerException { this.verbose = verbose; - String uploadUsing = Preferences.get("boards." + Preferences.get("board") + ".upload.using"); + String uploadUsing = + Preferences.get("boards." + Preferences.get("board") + ".upload.using"); if (uploadUsing == null) { // fall back on global preference uploadUsing = Preferences.get("upload.using"); @@ -62,19 +63,21 @@ public class AvrdudeUploader extends Uploader { private boolean uploadViaBootloader(String buildPath, String className) throws RunnerException { List commandDownloader = new ArrayList(); - String protocol = Preferences.get("boards." + Preferences.get("board") + ".upload.protocol"); + String protocol = + Preferences.get("boards." + Preferences.get("board") + ".upload.protocol"); // avrdude wants "stk500v1" to distinguish it from stk500v2 if (protocol.equals("stk500")) protocol = "stk500v1"; commandDownloader.add("-c" + protocol); - commandDownloader.add("-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port")); + commandDownloader.add( + "-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port")); commandDownloader.add( "-b" + Preferences.getInteger("boards." + Preferences.get("board") + ".upload.speed")); commandDownloader.add("-D"); // don't erase commandDownloader.add("-Uflash:w:" + buildPath + File.separator + className + ".hex:i"); - if (Preferences.get("boards." + Preferences.get("board") + ".upload.disable_flushing") == null || + if (Preferences.get("boards", "board", "upload.disable_flushing") == null || Preferences.getBoolean("boards." + Preferences.get("board") + ".upload.disable_flushing") == false) { flushSerialBuffer(); } @@ -115,11 +118,11 @@ public class AvrdudeUploader extends Uploader { throws RunnerException { List fuses = new ArrayList(); fuses.add("-e"); // erase the chip - fuses.add("-Ulock:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.unlock_bits") + ":m"); - if (Preferences.get("boards." + Preferences.get("board") + ".bootloader.extended_fuses") != null) - fuses.add("-Uefuse:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.extended_fuses") + ":m"); - fuses.add("-Uhfuse:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.high_fuses") + ":m"); - fuses.add("-Ulfuse:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.low_fuses") + ":m"); + fuses.add("-Ulock:w:" + Preferences.get("boards", "board", "bootloader.unlock_bits") + ":m"); + if (Preferences.get("boards", "board", "bootloader.extended_fuses") != null) + fuses.add("-Uefuse:w:" + Preferences.get("boards", "board", "bootloader.extended_fuses") + ":m"); + fuses.add("-Uhfuse:w:" + Preferences.get("boards", "board", "bootloader.high_fuses") + ":m"); + fuses.add("-Ulfuse:w:" + Preferences.get("boards", "board", "bootloader.low_fuses") + ":m"); if (!avrdude(params, fuses)) return false; @@ -128,11 +131,15 @@ public class AvrdudeUploader extends Uploader { Thread.sleep(1000); } catch (InterruptedException e) {} + String platform = Preferences.get("boards", "board", "build.core"); + File platformFile = Base.platformsTable.get(platform); + String bootloadersPath = new File(platformFile, "bootloaders").getAbsolutePath(); + List bootloader = new ArrayList(); - bootloader.add("-Uflash:w:" + Base.getHardwarePath() + File.separator + "bootloaders" + File.separator + - Preferences.get("boards." + Preferences.get("board") + ".bootloader.path") + - File.separator + Preferences.get("boards." + Preferences.get("board") + ".bootloader.file") + ":i"); - bootloader.add("-Ulock:w:" + Preferences.get("boards." + Preferences.get("board") + ".bootloader.lock_bits") + ":m"); + bootloader.add("-Uflash:w:" + bootloadersPath + File.separator + + Preferences.get("boards", "board", "bootloader.path") + File.separator + + Preferences.get("boards", "board", "bootloader.file") + ":i"); + bootloader.add("-Ulock:w:" + Preferences.get("boards", "board", "bootloader.lock_bits") + ":m"); return avrdude(params, bootloader); } @@ -165,7 +172,7 @@ public class AvrdudeUploader extends Uploader { commandDownloader.add("-q"); commandDownloader.add("-q"); } - commandDownloader.add("-p" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu")); + commandDownloader.add("-p" + Preferences.get("boards", "board", "build.mcu")); commandDownloader.addAll(params); return executeUploadCommand(commandDownloader); diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index 0a099405e..f1ba22123 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -36,7 +36,7 @@ import java.util.zip.*; public class Compiler implements MessageConsumer { static final String BUGS_URL = - "https://developer.berlios.de/bugs/?group_id=3590"; + "http://code.google.com/p/arduino/issues/list"; static final String SUPER_BADNESS = "Compiler error, please submit this code to " + BUGS_URL; @@ -112,9 +112,10 @@ public class Compiler implements MessageConsumer { for (File libraryFolder : sketch.getImportedLibraries()) { File outputFolder = new File(buildPath, libraryFolder.getName()); + File utilityFolder = new File(libraryFolder, "utility"); createFolder(outputFolder); // this library can use includes in its utility/ folder - includePaths.add(libraryFolder.getPath() + File.separator + "utility"); + includePaths.add(utilityFolder.getAbsolutePath()); objectFiles.addAll( compileFiles(avrBasePath, outputFolder.getAbsolutePath(), includePaths, findFilesInFolder(libraryFolder, "S", false), @@ -124,9 +125,9 @@ public class Compiler implements MessageConsumer { createFolder(outputFolder); objectFiles.addAll( compileFiles(avrBasePath, outputFolder.getAbsolutePath(), includePaths, - findFilesInFolder(new File(libraryFolder, "utility"), "S", false), - findFilesInFolder(new File(libraryFolder, "utility"), "c", false), - findFilesInFolder(new File(libraryFolder, "utility"), "cpp", false))); + findFilesInFolder(utilityFolder, "S", false), + findFilesInFolder(utilityFolder, "c", false), + findFilesInFolder(utilityFolder, "cpp", false))); // other libraries should not see this library's utility/ folder includePaths.remove(includePaths.size() - 1); } @@ -145,7 +146,7 @@ public class Compiler implements MessageConsumer { avrBasePath + "avr-gcc", "-Os", "-Wl,--gc-sections", - "-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"), + "-mmcu=" + Preferences.get("boards", "board", "build.mcu"), "-o", buildPath + File.separator + primaryClassName + ".elf" })); @@ -321,7 +322,9 @@ public class Compiler implements MessageConsumer { // attemping to compare // //String buildPathSubst = buildPath.replace(File.separatorChar, '/') + "/"; - String buildPathSubst = buildPath.replace(File.separatorChar,File.separatorChar) + File.separatorChar; + String buildPathSubst = + buildPath.replace(File.separatorChar,File.separatorChar) + + File.separatorChar; String partialTempPath = null; int partialStartIndex = -1; //s.indexOf(partialTempPath); @@ -451,8 +454,8 @@ public class Compiler implements MessageConsumer { "-c", // compile, don't link "-g", // include debugging info (so errors include line numbers) "-assembler-with-cpp", - "-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"), - "-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"), + "-mmcu=" + Preferences.get("boards", "board", "build.mcu"), + "-DF_CPU=" + Preferences.get("boards", "board", "build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); @@ -478,8 +481,8 @@ public class Compiler implements MessageConsumer { "-w", // surpress all warnings "-ffunction-sections", // place each function in its own section "-fdata-sections", - "-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"), - "-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"), + "-mmcu=" + Preferences.get("boards", "board", "build.mcu"), + "-DF_CPU=" + Preferences.get("boards", "board", "build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); @@ -506,8 +509,8 @@ public class Compiler implements MessageConsumer { "-fno-exceptions", "-ffunction-sections", // place each function in its own section "-fdata-sections", - "-mmcu=" + Preferences.get("boards." + Preferences.get("board") + ".build.mcu"), - "-DF_CPU=" + Preferences.get("boards." + Preferences.get("board") + ".build.f_cpu"), + "-mmcu=" + Preferences.get("boards", "board", "build.mcu"), + "-DF_CPU=" + Preferences.get("boards", "board", "build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); From d2a38e4b5a4260a70b79276667d7e64ce6547010 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 21 Nov 2009 23:23:43 +0000 Subject: [PATCH 7/8] Improving third-party hardware support: - moving back to multple cores per platform - using target instead of platform - moving per-board and per-programmer preferences out of Preferences.java and into a new Target class - adding a new "target" preference - support for platform:value values in board preferences for bootloader path and core - XXX: need to support platform:value syntax for board upload.using preferences. --- app/src/processing/app/Base.java | 101 ++++++++--------- app/src/processing/app/Editor.java | 4 +- app/src/processing/app/Preferences.java | 47 +------- app/src/processing/app/Sketch.java | 2 +- .../processing/app/debug/AvrdudeUploader.java | 84 ++++++++------ app/src/processing/app/debug/Compiler.java | 62 ++++++---- app/src/processing/app/debug/Target.java | 106 ++++++++++-------- app/src/processing/app/debug/Uploader.java | 2 +- .../arduino}/HardwareSerial.cpp | 0 .../{core => cores/arduino}/HardwareSerial.h | 0 .../arduino/{core => cores/arduino}/Makefile | 0 .../arduino/{core => cores/arduino}/Print.cpp | 0 .../arduino/{core => cores/arduino}/Print.h | 0 .../{core => cores/arduino}/WConstants.h | 0 .../{core => cores/arduino}/WInterrupts.c | 0 .../arduino/{core => cores/arduino}/WMath.cpp | 0 .../{core => cores/arduino}/WProgram.h | 0 .../arduino/{core => cores/arduino}/binary.h | 0 .../arduino/{core => cores/arduino}/main.cpp | 0 .../{core => cores/arduino}/pins_arduino.c | 0 .../{core => cores/arduino}/pins_arduino.h | 0 .../arduino/{core => cores/arduino}/wiring.c | 0 .../arduino/{core => cores/arduino}/wiring.h | 0 .../{core => cores/arduino}/wiring_analog.c | 0 .../{core => cores/arduino}/wiring_digital.c | 0 .../{core => cores/arduino}/wiring_private.h | 0 .../{core => cores/arduino}/wiring_pulse.c | 0 .../{core => cores/arduino}/wiring_shift.c | 0 28 files changed, 205 insertions(+), 203 deletions(-) rename hardware/arduino/{core => cores/arduino}/HardwareSerial.cpp (100%) rename hardware/arduino/{core => cores/arduino}/HardwareSerial.h (100%) rename hardware/arduino/{core => cores/arduino}/Makefile (100%) rename hardware/arduino/{core => cores/arduino}/Print.cpp (100%) rename hardware/arduino/{core => cores/arduino}/Print.h (100%) rename hardware/arduino/{core => cores/arduino}/WConstants.h (100%) rename hardware/arduino/{core => cores/arduino}/WInterrupts.c (100%) rename hardware/arduino/{core => cores/arduino}/WMath.cpp (100%) rename hardware/arduino/{core => cores/arduino}/WProgram.h (100%) rename hardware/arduino/{core => cores/arduino}/binary.h (100%) rename hardware/arduino/{core => cores/arduino}/main.cpp (100%) rename hardware/arduino/{core => cores/arduino}/pins_arduino.c (100%) rename hardware/arduino/{core => cores/arduino}/pins_arduino.h (100%) rename hardware/arduino/{core => cores/arduino}/wiring.c (100%) rename hardware/arduino/{core => cores/arduino}/wiring.h (100%) rename hardware/arduino/{core => cores/arduino}/wiring_analog.c (100%) rename hardware/arduino/{core => cores/arduino}/wiring_digital.c (100%) rename hardware/arduino/{core => cores/arduino}/wiring_private.h (100%) rename hardware/arduino/{core => cores/arduino}/wiring_pulse.c (100%) rename hardware/arduino/{core => cores/arduino}/wiring_shift.c (100%) diff --git a/app/src/processing/app/Base.java b/app/src/processing/app/Base.java index 58bee2355..3a73e4a41 100644 --- a/app/src/processing/app/Base.java +++ b/app/src/processing/app/Base.java @@ -30,6 +30,7 @@ import java.util.*; import javax.swing.*; import processing.app.debug.Compiler; +import processing.app.debug.Target; import processing.core.*; @@ -85,7 +86,7 @@ public class Base { // found in the sketchbook) static public String librariesClassPath; - static public HashMap platformsTable; + static public HashMap targetsTable; // Location for untitled items static File untitledFolder; @@ -278,7 +279,7 @@ public class Base { } } - platformsTable = new HashMap(); + targetsTable = new HashMap(); loadHardware(getHardwareFolder()); loadHardware(getSketchbookHardwareFolder()); @@ -997,19 +998,26 @@ public class Base { //System.out.println("rebuilding boards menu"); menu.removeAll(); ButtonGroup group = new ButtonGroup(); - for (String board : Preferences.getSubKeys("boards")) { - AbstractAction action = - new AbstractAction(Preferences.get("boards." + board + ".name")) { - public void actionPerformed(ActionEvent actionevent) { - //System.out.println("Switching to " + board); - Preferences.set("board", (String) getValue("board")); - } - }; - action.putValue("board", board); - JMenuItem item = new JRadioButtonMenuItem(action); - if (board.equals(Preferences.get("board"))) item.setSelected(true); - group.add(item); - menu.add(item); + for (Target target : targetsTable.values()) { + for (String board : target.getBoards().keySet()) { + AbstractAction action = + new AbstractAction(target.getBoards().get(board).get("name")) { + public void actionPerformed(ActionEvent actionevent) { + //System.out.println("Switching to " + target + ":" + board); + Preferences.set("target", (String) getValue("target")); + Preferences.set("board", (String) getValue("board")); + } + }; + action.putValue("target", target.getName()); + action.putValue("board", board); + JMenuItem item = new JRadioButtonMenuItem(action); + if (target.getName().equals(Preferences.get("target")) && + board.equals(Preferences.get("board"))) { + item.setSelected(true); + } + group.add(item); + menu.add(item); + } } } @@ -1017,17 +1025,21 @@ public class Base { public void rebuildBurnBootloaderMenu(JMenu menu) { //System.out.println("rebuilding burn bootloader menu"); menu.removeAll(); - for (String programmer : Preferences.getSubKeys("programmers")) { - AbstractAction action = - new AbstractAction( - "w/ " + Preferences.get("programmers." + programmer + ".name")) { - public void actionPerformed(ActionEvent actionevent) { - activeEditor.handleBurnBootloader((String) getValue("programmer")); - } - }; - action.putValue("programmer", programmer); - JMenuItem item = new JMenuItem(action); - menu.add(item); + for (Target target : targetsTable.values()) { + for (String programmer : target.getProgrammers().keySet()) { + AbstractAction action = + new AbstractAction( + "w/ " + target.getProgrammers().get(programmer).get("name")) { + public void actionPerformed(ActionEvent actionevent) { + activeEditor.handleBurnBootloader((String) getValue("target"), + (String) getValue("programmer")); + } + }; + action.putValue("target", target.getName()); + action.putValue("programmer", programmer); + JMenuItem item = new JMenuItem(action); + menu.add(item); + } } } @@ -1228,30 +1240,9 @@ public class Base { // replaced hella slow bubble sort with this feller for 0093 Arrays.sort(list, String.CASE_INSENSITIVE_ORDER); - for (String platform : list) { - File subfolder = new File(folder, platform); - - File boardsFile = new File(subfolder, "boards.txt"); - try { - if (boardsFile.exists()) { - Preferences.load(new FileInputStream(boardsFile), "boards"); - } - } catch (Exception e) { - System.err.println("Error loading boards from " + - boardsFile + ": " + e); - } - - File programmersFile = new File(subfolder, "programmers.txt"); - try { - if (programmersFile.exists()) { - Preferences.load(new FileInputStream(programmersFile), "programmers"); - } - } catch (Exception e) { - System.err.println("Error loading programmers from " + - programmersFile + ": " + e); - } - - platformsTable.put(platform, subfolder); + for (String target : list) { + File subfolder = new File(folder, target); + targetsTable.put(target, new Target(target, subfolder)); } } @@ -1524,6 +1515,16 @@ public class Base { } } + + static public Target getTarget() { + return Base.targetsTable.get(Preferences.get("target")); + } + + + static public Map getBoardPreferences() { + return getTarget().getBoards().get(Preferences.get("board")); + } + static public File getSketchbookFolder() { return new File(Preferences.get("sketchbook.path")); diff --git a/app/src/processing/app/Editor.java b/app/src/processing/app/Editor.java index 355dca9d4..30ceb6b2b 100644 --- a/app/src/processing/app/Editor.java +++ b/app/src/processing/app/Editor.java @@ -2279,14 +2279,14 @@ public class Editor extends JFrame implements RunnerListener { } - protected void handleBurnBootloader(final String programmer) { + protected void handleBurnBootloader(final String target, final String programmer) { console.clear(); statusNotice("Burning bootloader to I/O Board (this may take a minute)..."); SwingUtilities.invokeLater(new Runnable() { public void run() { try { Uploader uploader = new AvrdudeUploader(); - if (uploader.burnBootloader(programmer)) { + if (uploader.burnBootloader(target, programmer)) { statusNotice("Done burning bootloader."); } else { statusError("Error while burning bootloader."); diff --git a/app/src/processing/app/Preferences.java b/app/src/processing/app/Preferences.java index 003804f0a..a2b790bba 100644 --- a/app/src/processing/app/Preferences.java +++ b/app/src/processing/app/Preferences.java @@ -131,7 +131,6 @@ public class Preferences { static Hashtable defaults; static Hashtable table = new Hashtable();; - static Hashtable prefixes = new Hashtable(); static File preferencesFile; @@ -550,12 +549,7 @@ public class Preferences { load(input, table); } - static protected void load(InputStream input, String prefix) throws IOException { - if (!prefixes.containsKey(prefix)) prefixes.put(prefix, new LinkedHashMap()); - load(input, (Map) prefixes.get(prefix)); - } - - static protected void load(InputStream input, Map table) throws IOException { + static public void load(InputStream input, Map table) throws IOException { String[] lines = PApplet.loadStrings(input); // Reads as UTF-8 for (String line : lines) { if ((line.length() == 0) || @@ -609,24 +603,7 @@ public class Preferences { //return get(attribute, null); //} - static public String get(String prefix, String selector, String suffix) { - if (get(selector) == null) return null; - return get(prefix + "." + get(selector) + "." + suffix); - } - static public String get(String attribute /*, String defaultValue */) { - // if the attribute starts with a prefix used by one of our subsidiary - // preference files, look up the attribute in that file's Hashtable - // (don't override with or fallback to the main file). otherwise, - // look up the attribute in the main file's Hashtable. - Map table = Preferences.table; - if (attribute.indexOf('.') != -1) { - String prefix = attribute.substring(0, attribute.indexOf('.')); - if (prefixes.containsKey(prefix)) { - table = (Map) prefixes.get(prefix); - attribute = attribute.substring(attribute.indexOf('.') + 1); - } - } return (String) table.get(attribute); /* //String value = (properties != null) ? @@ -639,28 +616,6 @@ public class Preferences { } - /** - * Get the top-level key prefixes defined in the subsidiary file loaded with - * the given prefix. For example, if the file contains: - * foo.count=1 - * bar.count=2 - * baz.count=3 - * this will return { "foo", "bar", "baz" }. - */ - static public Set getSubKeys(String prefix) { - if (!prefixes.containsKey(prefix)) - return null; - Set subkeys = new LinkedHashSet(); - for (Iterator i = ((Map) prefixes.get(prefix)).keySet().iterator(); i.hasNext(); ) { - String subkey = (String) i.next(); - if (subkey.indexOf('.') != -1) - subkey = subkey.substring(0, subkey.indexOf('.')); - subkeys.add(subkey); - } - return subkeys; - } - - static public String getDefault(String attribute) { return (String) defaults.get(attribute); } diff --git a/app/src/processing/app/Sketch.java b/app/src/processing/app/Sketch.java index a27ba72ed..b70abc019 100644 --- a/app/src/processing/app/Sketch.java +++ b/app/src/processing/app/Sketch.java @@ -1447,7 +1447,7 @@ public class Sketch { protected void size(String buildPath, String suggestedClassName) throws RunnerException { long size = 0; - long maxsize = Preferences.getInteger("boards." + Preferences.get("board") + ".upload.maximum_size"); + long maxsize = Integer.parseInt(Base.getBoardPreferences().get("upload.maximum_size")); Sizer sizer = new Sizer(buildPath, suggestedClassName); try { size = sizer.computeSize(); diff --git a/app/src/processing/app/debug/AvrdudeUploader.java b/app/src/processing/app/debug/AvrdudeUploader.java index 27b5fecd1..02fdc7837 100755 --- a/app/src/processing/app/debug/AvrdudeUploader.java +++ b/app/src/processing/app/debug/AvrdudeUploader.java @@ -45,8 +45,8 @@ public class AvrdudeUploader extends Uploader { public boolean uploadUsingPreferences(String buildPath, String className, boolean verbose) throws RunnerException { this.verbose = verbose; - String uploadUsing = - Preferences.get("boards." + Preferences.get("board") + ".upload.using"); + Map boardPreferences = Base.getBoardPreferences(); + String uploadUsing = boardPreferences.get("upload.using"); if (uploadUsing == null) { // fall back on global preference uploadUsing = Preferences.get("upload.using"); @@ -54,7 +54,8 @@ public class AvrdudeUploader extends Uploader { if (uploadUsing.equals("bootloader")) { return uploadViaBootloader(buildPath, className); } else { - Collection params = getProgrammerCommands(uploadUsing); + // XXX: this needs to handle programmers in other targets. + Collection params = getProgrammerCommands(Base.getTarget().getName(), uploadUsing); params.add("-Uflash:w:" + buildPath + File.separator + className + ".hex:i"); return avrdude(params); } @@ -62,9 +63,9 @@ public class AvrdudeUploader extends Uploader { private boolean uploadViaBootloader(String buildPath, String className) throws RunnerException { + Map boardPreferences = Base.getBoardPreferences(); List commandDownloader = new ArrayList(); - String protocol = - Preferences.get("boards." + Preferences.get("board") + ".upload.protocol"); + String protocol = boardPreferences.get("upload.protocol"); // avrdude wants "stk500v1" to distinguish it from stk500v2 if (protocol.equals("stk500")) @@ -73,56 +74,59 @@ public class AvrdudeUploader extends Uploader { commandDownloader.add( "-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port")); commandDownloader.add( - "-b" + Preferences.getInteger("boards." + Preferences.get("board") + ".upload.speed")); + "-b" + Integer.parseInt(boardPreferences.get("upload.speed"))); commandDownloader.add("-D"); // don't erase commandDownloader.add("-Uflash:w:" + buildPath + File.separator + className + ".hex:i"); - if (Preferences.get("boards", "board", "upload.disable_flushing") == null || - Preferences.getBoolean("boards." + Preferences.get("board") + ".upload.disable_flushing") == false) { + if (boardPreferences.get("upload.disable_flushing") == null || + boardPreferences.get("upload.disable_flushing").toLowerCase().equals("false")) { flushSerialBuffer(); } return avrdude(commandDownloader); } - public boolean burnBootloader(String programmer) throws RunnerException { - return burnBootloader(getProgrammerCommands(programmer)); + public boolean burnBootloader(String target, String programmer) throws RunnerException { + return burnBootloader(getProgrammerCommands(target, programmer)); } - private Collection getProgrammerCommands(String programmer) { + private Collection getProgrammerCommands(String targetName, String programmer) { + Target target = Base.targetsTable.get(targetName); + Map programmerPreferences = target.getProgrammers().get(programmer); List params = new ArrayList(); - params.add("-c" + Preferences.get("programmers." + programmer + ".protocol")); + params.add("-c" + programmerPreferences.get("protocol")); - if ("usb".equals(Preferences.get("programmers." + programmer + ".communication"))) { + if ("usb".equals(programmerPreferences.get("communication"))) { params.add("-Pusb"); - } else if ("serial".equals(Preferences.get("programmers." + programmer + ".communication"))) { + } else if ("serial".equals(programmerPreferences.get("communication"))) { params.add("-P" + (Base.isWindows() ? "\\\\.\\" : "") + Preferences.get("serial.port")); - if (Preferences.get("programmers." + programmer + ".speed") != null) { - params.add("-b" + Preferences.getInteger("programmers." + programmer + ".speed")); + if (programmerPreferences.get("speed") != null) { + params.add("-b" + Integer.parseInt(programmerPreferences.get("speed"))); } } // XXX: add support for specifying the port address for parallel // programmers, although avrdude has a default that works in most cases. - if (Preferences.get("programmers." + programmer + ".force") != null && - Preferences.getBoolean("programmers." + programmer + ".force")) + if (programmerPreferences.get("force") != null && + programmerPreferences.get("force").toLowerCase().equals("true")) params.add("-F"); - if (Preferences.get("programmers." + programmer + ".delay") != null) - params.add("-i" + Preferences.get("programmers." + programmer + ".delay")); + if (programmerPreferences.get("delay") != null) + params.add("-i" + programmerPreferences.get("delay")); return params; } protected boolean burnBootloader(Collection params) throws RunnerException { + Map boardPreferences = Base.getBoardPreferences(); List fuses = new ArrayList(); fuses.add("-e"); // erase the chip - fuses.add("-Ulock:w:" + Preferences.get("boards", "board", "bootloader.unlock_bits") + ":m"); - if (Preferences.get("boards", "board", "bootloader.extended_fuses") != null) - fuses.add("-Uefuse:w:" + Preferences.get("boards", "board", "bootloader.extended_fuses") + ":m"); - fuses.add("-Uhfuse:w:" + Preferences.get("boards", "board", "bootloader.high_fuses") + ":m"); - fuses.add("-Ulfuse:w:" + Preferences.get("boards", "board", "bootloader.low_fuses") + ":m"); + fuses.add("-Ulock:w:" + boardPreferences.get("bootloader.unlock_bits") + ":m"); + if (boardPreferences.get("bootloader.extended_fuses") != null) + fuses.add("-Uefuse:w:" + boardPreferences.get("bootloader.extended_fuses") + ":m"); + fuses.add("-Uhfuse:w:" + boardPreferences.get("bootloader.high_fuses") + ":m"); + fuses.add("-Ulfuse:w:" + boardPreferences.get("bootloader.low_fuses") + ":m"); if (!avrdude(params, fuses)) return false; @@ -130,16 +134,26 @@ public class AvrdudeUploader extends Uploader { try { Thread.sleep(1000); } catch (InterruptedException e) {} - - String platform = Preferences.get("boards", "board", "build.core"); - File platformFile = Base.platformsTable.get(platform); - String bootloadersPath = new File(platformFile, "bootloaders").getAbsolutePath(); - + + Target t; + String bootloaderPath = boardPreferences.get("bootloader.path"); + + if (bootloaderPath.indexOf(':') == -1) { + t = Base.getTarget(); // the current target (associated with the board) + } else { + String targetName = bootloaderPath.substring(0, bootloaderPath.indexOf(':')); + t = Base.targetsTable.get(targetName); + bootloaderPath = bootloaderPath.substring(bootloaderPath.indexOf(':') + 1); + } + + File bootloadersFile = new File(t.getFolder(), "bootloaders"); + File bootloaderFile = new File(bootloadersFile, bootloaderPath); + bootloaderPath = bootloaderFile.getAbsolutePath(); + List bootloader = new ArrayList(); - bootloader.add("-Uflash:w:" + bootloadersPath + File.separator + - Preferences.get("boards", "board", "bootloader.path") + File.separator + - Preferences.get("boards", "board", "bootloader.file") + ":i"); - bootloader.add("-Ulock:w:" + Preferences.get("boards", "board", "bootloader.lock_bits") + ":m"); + bootloader.add("-Uflash:w:" + bootloaderPath + File.separator + + boardPreferences.get("bootloader.file") + ":i"); + bootloader.add("-Ulock:w:" + boardPreferences.get("bootloader.lock_bits") + ":m"); return avrdude(params, bootloader); } @@ -172,7 +186,7 @@ public class AvrdudeUploader extends Uploader { commandDownloader.add("-q"); commandDownloader.add("-q"); } - commandDownloader.add("-p" + Preferences.get("boards", "board", "build.mcu")); + commandDownloader.add("-p" + Base.getBoardPreferences().get("build.mcu")); commandDownloader.addAll(params); return executeUploadCommand(commandDownloader); diff --git a/app/src/processing/app/debug/Compiler.java b/app/src/processing/app/debug/Compiler.java index f1ba22123..850d10a64 100644 --- a/app/src/processing/app/debug/Compiler.java +++ b/app/src/processing/app/debug/Compiler.java @@ -71,9 +71,20 @@ public class Compiler implements MessageConsumer { MessageStream pms = new MessageStream(this); String avrBasePath = Base.getAvrBasePath(); - String platform = Preferences.get("boards", "board", "build.core"); - File platformFile = Base.platformsTable.get(platform); - String corePath = new File(platformFile, "core").getAbsolutePath(); + Map boardPreferences = Base.getBoardPreferences(); + String core = boardPreferences.get("build.core"); + String corePath; + + if (core.indexOf(':') == -1) { + Target t = Base.getTarget(); + File coreFolder = new File(new File(t.getFolder(), "cores"), core); + corePath = coreFolder.getAbsolutePath(); + } else { + Target t = Base.targetsTable.get(core.substring(0, core.indexOf(':'))); + File coresFolder = new File(t.getFolder(), "cores"); + File coreFolder = new File(coresFolder, core.substring(core.indexOf(':') + 1)); + corePath = coreFolder.getAbsolutePath(); + } List objectFiles = new ArrayList(); @@ -89,7 +100,8 @@ public class Compiler implements MessageConsumer { compileFiles(avrBasePath, buildPath, includePaths, findFilesInPath(corePath, "S", true), findFilesInPath(corePath, "c", true), - findFilesInPath(corePath, "cpp", true)); + findFilesInPath(corePath, "cpp", true), + boardPreferences); List baseCommandAR = new ArrayList(Arrays.asList(new String[] { avrBasePath + "avr-ar", @@ -120,14 +132,16 @@ public class Compiler implements MessageConsumer { compileFiles(avrBasePath, outputFolder.getAbsolutePath(), includePaths, findFilesInFolder(libraryFolder, "S", false), findFilesInFolder(libraryFolder, "c", false), - findFilesInFolder(libraryFolder, "cpp", false))); + findFilesInFolder(libraryFolder, "cpp", false), + boardPreferences)); outputFolder = new File(outputFolder, "utility"); createFolder(outputFolder); objectFiles.addAll( compileFiles(avrBasePath, outputFolder.getAbsolutePath(), includePaths, findFilesInFolder(utilityFolder, "S", false), findFilesInFolder(utilityFolder, "c", false), - findFilesInFolder(utilityFolder, "cpp", false))); + findFilesInFolder(utilityFolder, "cpp", false), + boardPreferences)); // other libraries should not see this library's utility/ folder includePaths.remove(includePaths.size() - 1); } @@ -138,7 +152,8 @@ public class Compiler implements MessageConsumer { compileFiles(avrBasePath, buildPath, includePaths, findFilesInPath(buildPath, "S", false), findFilesInPath(buildPath, "c", false), - findFilesInPath(buildPath, "cpp", false))); + findFilesInPath(buildPath, "cpp", false), + boardPreferences)); // 4. link it all together into the .elf file @@ -146,7 +161,7 @@ public class Compiler implements MessageConsumer { avrBasePath + "avr-gcc", "-Os", "-Wl,--gc-sections", - "-mmcu=" + Preferences.get("boards", "board", "build.mcu"), + "-mmcu=" + boardPreferences.get("build.mcu"), "-o", buildPath + File.separator + primaryClassName + ".elf" })); @@ -197,7 +212,8 @@ public class Compiler implements MessageConsumer { private List compileFiles(String avrBasePath, String buildPath, List includePaths, List sSources, - List cSources, List cppSources) + List cSources, List cppSources, + Map boardPreferences) throws RunnerException { List objectPaths = new ArrayList(); @@ -207,7 +223,8 @@ public class Compiler implements MessageConsumer { objectPaths.add(new File(objectPath)); execAsynchronously(getCommandCompilerS(avrBasePath, includePaths, file.getAbsolutePath(), - objectPath)); + objectPath, + boardPreferences)); } for (File file : cSources) { @@ -215,7 +232,8 @@ public class Compiler implements MessageConsumer { objectPaths.add(new File(objectPath)); execAsynchronously(getCommandCompilerC(avrBasePath, includePaths, file.getAbsolutePath(), - objectPath)); + objectPath, + boardPreferences)); } for (File file : cppSources) { @@ -223,7 +241,8 @@ public class Compiler implements MessageConsumer { objectPaths.add(new File(objectPath)); execAsynchronously(getCommandCompilerCPP(avrBasePath, includePaths, file.getAbsolutePath(), - objectPath)); + objectPath, + boardPreferences)); } return objectPaths; @@ -448,14 +467,14 @@ public class Compiler implements MessageConsumer { ///////////////////////////////////////////////////////////////////////////// static private List getCommandCompilerS(String avrBasePath, List includePaths, - String sourceName, String objectName) { + String sourceName, String objectName, Map boardPreferences) { List baseCommandCompiler = new ArrayList(Arrays.asList(new String[] { avrBasePath + "avr-gcc", "-c", // compile, don't link "-g", // include debugging info (so errors include line numbers) "-assembler-with-cpp", - "-mmcu=" + Preferences.get("boards", "board", "build.mcu"), - "-DF_CPU=" + Preferences.get("boards", "board", "build.f_cpu"), + "-mmcu=" + boardPreferences.get("build.mcu"), + "-DF_CPU=" + boardPreferences.get("build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); @@ -471,7 +490,7 @@ public class Compiler implements MessageConsumer { static private List getCommandCompilerC(String avrBasePath, List includePaths, - String sourceName, String objectName) { + String sourceName, String objectName, Map boardPreferences) { List baseCommandCompiler = new ArrayList(Arrays.asList(new String[] { avrBasePath + "avr-gcc", @@ -481,8 +500,8 @@ public class Compiler implements MessageConsumer { "-w", // surpress all warnings "-ffunction-sections", // place each function in its own section "-fdata-sections", - "-mmcu=" + Preferences.get("boards", "board", "build.mcu"), - "-DF_CPU=" + Preferences.get("boards", "board", "build.f_cpu"), + "-mmcu=" + boardPreferences.get("build.mcu"), + "-DF_CPU=" + boardPreferences.get("build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); @@ -498,7 +517,8 @@ public class Compiler implements MessageConsumer { static private List getCommandCompilerCPP(String avrBasePath, - List includePaths, String sourceName, String objectName) { + List includePaths, String sourceName, String objectName, + Map boardPreferences) { List baseCommandCompilerCPP = new ArrayList(Arrays.asList(new String[] { avrBasePath + "avr-g++", @@ -509,8 +529,8 @@ public class Compiler implements MessageConsumer { "-fno-exceptions", "-ffunction-sections", // place each function in its own section "-fdata-sections", - "-mmcu=" + Preferences.get("boards", "board", "build.mcu"), - "-DF_CPU=" + Preferences.get("boards", "board", "build.f_cpu"), + "-mmcu=" + boardPreferences.get("build.mcu"), + "-DF_CPU=" + boardPreferences.get("build.f_cpu"), "-DARDUINO=" + Base.REVISION, })); diff --git a/app/src/processing/app/debug/Target.java b/app/src/processing/app/debug/Target.java index 6788cb319..1aa2f81be 100644 --- a/app/src/processing/app/debug/Target.java +++ b/app/src/processing/app/debug/Target.java @@ -1,11 +1,10 @@ /* -*- mode: jde; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* - Target - represents a target platform - Part of the Arduino project - http://arduino.berlios.de/ + Target - represents a hardware platform + Part of the Arduino project - http://www.arduino.cc/ - Copyright (c) 2005 - David A. Mellis + Copyright (c) 2009 David A. Mellis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,59 +20,72 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - $Id: Target.java 85 2006-01-12 23:24:12Z mellis $ + $Id$ */ package processing.app.debug; + import java.io.*; import java.util.*; -/** - * Represents a target platform (e.g. Wiring board, Arduino board). - */ -public class Target { - String path; - List sources = new ArrayList(); - List objects = new ArrayList(); +import processing.app.Preferences; - /** - * Create a Target. - * @param path the directory containing config, source, and object files for - * the target platform. - */ - public Target(String base, String target) throws IOException { - path = base + File.separator + target; - String[] files = (new File(path)).list(); +public class Target { + private String name; + private File folder; + private Map boards; + private Map programmers; + + public Target(String name, File folder) { + this.name = name; + this.folder = folder; + this.boards = new LinkedHashMap(); + this.programmers = new LinkedHashMap(); - if (files == null) - throw new IOException("Target platform: \"" + target + "\" not found.\n" + - "Make sure that \"build.target\" in the \n" + - "preferences file points to a subdirectory of \n" + - base); - - for (int i = 0; i < files.length; i++) { - if (files[i].endsWith(".S") || files[i].endsWith(".c") || files[i].endsWith(".cpp")) - sources.add(files[i]); - if (files[i].endsWith(".o")) - objects.add(files[i]); + File boardsFile = new File(folder, "boards.txt"); + try { + if (boardsFile.exists()) { + Map boardPreferences = new LinkedHashMap(); + Preferences.load(new FileInputStream(boardsFile), boardPreferences); + for (Object k : boardPreferences.keySet()) { + String key = (String) k; + String board = key.substring(0, key.indexOf('.')); + if (!boards.containsKey(board)) boards.put(board, new HashMap()); + ((Map) boards.get(board)).put( + key.substring(key.indexOf('.') + 1), + boardPreferences.get(key)); + } + } + } catch (Exception e) { + System.err.println("Error loading boards from " + boardsFile + ": " + e); } + + File programmersFile = new File(folder, "programmers.txt"); + try { + if (programmersFile.exists()) { + Map programmerPreferences = new LinkedHashMap(); + Preferences.load(new FileInputStream(programmersFile), programmerPreferences); + for (Object k : programmerPreferences.keySet()) { + String key = (String) k; + String programmer = key.substring(0, key.indexOf('.')); + if (!programmers.containsKey(programmer)) programmers.put(programmer, new HashMap()); + ((Map) programmers.get(programmer)).put( + key.substring(key.indexOf('.') + 1), + programmerPreferences.get(key)); + } + } + } catch (Exception e) { + System.err.println("Error loading programmers from " + + programmersFile + ": " + e); + } } - public String getPath() { return path; } - - /** - * The source files in the library for the target platform. - * @return A read-only collection of strings containing the name of each source file. - */ - public Collection getSourceFilenames() { - return Collections.unmodifiableList(sources); + public String getName() { return name; } + public File getFolder() { return folder; } + public Map> getBoards() { + return boards; } - - /** - * The object files in the library for the target platform. - * @return A read-only collection of strings containing the name of each object file. - */ - public Collection getObjectFilenames() { - return Collections.unmodifiableList(objects); + public Map> getProgrammers() { + return programmers; } -} +} \ No newline at end of file diff --git a/app/src/processing/app/debug/Uploader.java b/app/src/processing/app/debug/Uploader.java index e91dc2c71..8318727e5 100755 --- a/app/src/processing/app/debug/Uploader.java +++ b/app/src/processing/app/debug/Uploader.java @@ -65,7 +65,7 @@ public abstract class Uploader implements MessageConsumer { public abstract boolean uploadUsingPreferences(String buildPath, String className, boolean verbose) throws RunnerException; - public abstract boolean burnBootloader(String programmer) throws RunnerException; + public abstract boolean burnBootloader(String target, String programmer) throws RunnerException; protected void flushSerialBuffer() throws RunnerException { // Cleanup the serial buffer diff --git a/hardware/arduino/core/HardwareSerial.cpp b/hardware/arduino/cores/arduino/HardwareSerial.cpp similarity index 100% rename from hardware/arduino/core/HardwareSerial.cpp rename to hardware/arduino/cores/arduino/HardwareSerial.cpp diff --git a/hardware/arduino/core/HardwareSerial.h b/hardware/arduino/cores/arduino/HardwareSerial.h similarity index 100% rename from hardware/arduino/core/HardwareSerial.h rename to hardware/arduino/cores/arduino/HardwareSerial.h diff --git a/hardware/arduino/core/Makefile b/hardware/arduino/cores/arduino/Makefile similarity index 100% rename from hardware/arduino/core/Makefile rename to hardware/arduino/cores/arduino/Makefile diff --git a/hardware/arduino/core/Print.cpp b/hardware/arduino/cores/arduino/Print.cpp similarity index 100% rename from hardware/arduino/core/Print.cpp rename to hardware/arduino/cores/arduino/Print.cpp diff --git a/hardware/arduino/core/Print.h b/hardware/arduino/cores/arduino/Print.h similarity index 100% rename from hardware/arduino/core/Print.h rename to hardware/arduino/cores/arduino/Print.h diff --git a/hardware/arduino/core/WConstants.h b/hardware/arduino/cores/arduino/WConstants.h similarity index 100% rename from hardware/arduino/core/WConstants.h rename to hardware/arduino/cores/arduino/WConstants.h diff --git a/hardware/arduino/core/WInterrupts.c b/hardware/arduino/cores/arduino/WInterrupts.c similarity index 100% rename from hardware/arduino/core/WInterrupts.c rename to hardware/arduino/cores/arduino/WInterrupts.c diff --git a/hardware/arduino/core/WMath.cpp b/hardware/arduino/cores/arduino/WMath.cpp similarity index 100% rename from hardware/arduino/core/WMath.cpp rename to hardware/arduino/cores/arduino/WMath.cpp diff --git a/hardware/arduino/core/WProgram.h b/hardware/arduino/cores/arduino/WProgram.h similarity index 100% rename from hardware/arduino/core/WProgram.h rename to hardware/arduino/cores/arduino/WProgram.h diff --git a/hardware/arduino/core/binary.h b/hardware/arduino/cores/arduino/binary.h similarity index 100% rename from hardware/arduino/core/binary.h rename to hardware/arduino/cores/arduino/binary.h diff --git a/hardware/arduino/core/main.cpp b/hardware/arduino/cores/arduino/main.cpp similarity index 100% rename from hardware/arduino/core/main.cpp rename to hardware/arduino/cores/arduino/main.cpp diff --git a/hardware/arduino/core/pins_arduino.c b/hardware/arduino/cores/arduino/pins_arduino.c similarity index 100% rename from hardware/arduino/core/pins_arduino.c rename to hardware/arduino/cores/arduino/pins_arduino.c diff --git a/hardware/arduino/core/pins_arduino.h b/hardware/arduino/cores/arduino/pins_arduino.h similarity index 100% rename from hardware/arduino/core/pins_arduino.h rename to hardware/arduino/cores/arduino/pins_arduino.h diff --git a/hardware/arduino/core/wiring.c b/hardware/arduino/cores/arduino/wiring.c similarity index 100% rename from hardware/arduino/core/wiring.c rename to hardware/arduino/cores/arduino/wiring.c diff --git a/hardware/arduino/core/wiring.h b/hardware/arduino/cores/arduino/wiring.h similarity index 100% rename from hardware/arduino/core/wiring.h rename to hardware/arduino/cores/arduino/wiring.h diff --git a/hardware/arduino/core/wiring_analog.c b/hardware/arduino/cores/arduino/wiring_analog.c similarity index 100% rename from hardware/arduino/core/wiring_analog.c rename to hardware/arduino/cores/arduino/wiring_analog.c diff --git a/hardware/arduino/core/wiring_digital.c b/hardware/arduino/cores/arduino/wiring_digital.c similarity index 100% rename from hardware/arduino/core/wiring_digital.c rename to hardware/arduino/cores/arduino/wiring_digital.c diff --git a/hardware/arduino/core/wiring_private.h b/hardware/arduino/cores/arduino/wiring_private.h similarity index 100% rename from hardware/arduino/core/wiring_private.h rename to hardware/arduino/cores/arduino/wiring_private.h diff --git a/hardware/arduino/core/wiring_pulse.c b/hardware/arduino/cores/arduino/wiring_pulse.c similarity index 100% rename from hardware/arduino/core/wiring_pulse.c rename to hardware/arduino/cores/arduino/wiring_pulse.c diff --git a/hardware/arduino/core/wiring_shift.c b/hardware/arduino/cores/arduino/wiring_shift.c similarity index 100% rename from hardware/arduino/core/wiring_shift.c rename to hardware/arduino/cores/arduino/wiring_shift.c From 70b68efceff424f8430320c7451a6d717afff733 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Thu, 26 Nov 2009 05:18:31 +0000 Subject: [PATCH 8/8] Adding pin 13 (row 5): http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1259066861 --- .../examples/Display/RowColumnScanning/RowColumnScanning.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/shared/examples/Display/RowColumnScanning/RowColumnScanning.pde b/build/shared/examples/Display/RowColumnScanning/RowColumnScanning.pde index 8c01783ce..49f6ab714 100644 --- a/build/shared/examples/Display/RowColumnScanning/RowColumnScanning.pde +++ b/build/shared/examples/Display/RowColumnScanning/RowColumnScanning.pde @@ -34,7 +34,7 @@ // 2-dimensional array of row pin numbers: const int row[8] = { - 2,7,19,5,18,12,16 }; + 2,7,19,5,13,18,12,16 }; // 2-dimensional array of column pin numbers: const int col[8] = {