From ab1eb4aaa0a00d4f353831c3c7e391c3ce705f55 Mon Sep 17 00:00:00 2001 From: "David A. Mellis" Date: Sat, 7 Nov 2009 17:05:21 +0000 Subject: [PATCH] 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