diff options
author | Christian Pointner <equinox@spreadspace.org> | 2013-08-04 12:32:14 +0000 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2013-08-04 12:32:14 +0000 |
commit | b5774b1c9cb1801b1b4cb84540d7975b20302882 (patch) | |
tree | 8e16d396ab021332b08b53b57766eec17d7c4e79 | |
parent | ds1820 onewire lib (diff) |
added support for teenstep
git-svn-id: https://svn.spreadspace.org/avr/trunk@215 aa12f405-d877-488e-9caf-2d797e2a1cc7
-rw-r--r-- | defines.mk | 8 | ||||
-rw-r--r-- | lib/led.c | 11 | ||||
-rw-r--r-- | lib/util.c | 7 | ||||
-rw-r--r-- | usb-led/Makefile | 2 |
4 files changed, 19 insertions, 9 deletions
@@ -112,6 +112,14 @@ ifeq ($(BOARD_TYPE),slowpandongle2) PROG := DFU LUFA_BOARD = NONE endif +ifeq ($(BOARD_TYPE),teenstep) + MCU := atmega32u4 + ARCH = AVR8 + F_CPU := 16000000 + F_USB = $(F_CPU) + PROG := DFU + LUFA_BOARD = NONE +endif ifeq ($(BOARD_TYPE),arduinoUno) MCU := atmega328p ARCH = AVR8 @@ -26,10 +26,10 @@ #if defined(__BOARD_minimus__) || defined(__BOARD_minimus32__) #define NUM_LEDS 2 -#elif defined(__BOARD_teensy1__) || defined(__BOARD_teensy1pp__) || defined(__BOARD_teensy2__) || defined(__BOARD_teensy2pp__) \ - || defined(__BOARD_arduinoNG__) || defined(__BOARD_arduino2009v2__) || defined(__BOARD_arduino2009__) || defined(__BOARD_arduino10000__) \ - || defined(__BOARD_hhd70dongle__) || defined(__BOARD_rda1846dongle__) || defined(__BOARD_culV3__) \ - || defined(__BOARD_slowpandongle1__) || defined(__BOARD_slowpandongle2__) +#elif defined(__BOARD_teensy1__) || defined(__BOARD_teensy1pp__) || defined(__BOARD_teensy2__) || defined(__BOARD_teensy2pp__) || \ + defined(__BOARD_arduinoNG__) || defined(__BOARD_arduino2009v2__) || defined(__BOARD_arduino2009__) || defined(__BOARD_arduino10000__) || \ + defined(__BOARD_hhd70dongle__) || defined(__BOARD_rda1846dongle__) || defined(__BOARD_culV3__) || \ + defined(__BOARD_slowpandongle1__) || defined(__BOARD_slowpandongle2__) || defined(__BOARD_teenstep__) #define NUM_LEDS 1 #else #define NUM_LEDS 0 @@ -41,7 +41,8 @@ #define LED_DIR 1 #endif -#if defined(__BOARD_teensy1__) || defined(__BOARD_teensy1pp__) || defined(__BOARD_teensy2__) || defined(__BOARD_teensy2pp__) +#if defined(__BOARD_teensy1__) || defined(__BOARD_teensy1pp__) || defined(__BOARD_teensy2__) || defined(__BOARD_teensy2pp__) || \ + defined(__BOARD_teenstep__) #define LED_PORT PORTD #define LED_DDR DDRD #define LED_PINNUM 6 @@ -51,7 +51,7 @@ void cpu_init(void) #define BOOTLOADER_VEC 0x3800 #elif defined(__BOARD_hhd70dongle__) || defined(__BOARD_rda1846dongle__) || defined(__BOARD_culV3__) #define BOOTLOADER_VEC 0x3800 -#elif defined(__BOARD_slowpandongle1__) || defined(__BOARD_slowpandongle2__) +#elif defined(__BOARD_slowpandongle1__) || defined(__BOARD_slowpandongle2__) || defined(__teenstep__) #define BOOTLOADER_VEC 0x3800 #else #define BOOTLOADER_VEC 0x0000 @@ -64,7 +64,7 @@ void reset2bootloader(void) { #if defined(__BOARD_teensy1__) || defined(__BOARD_teensy1pp__) || defined(__BOARD_teensy2__) || defined(__BOARD_teensy2pp__) || \ defined(__BOARD_hhd70dongle__) || defined(__BOARD_rda1846dongle__) || defined(__BOARD_culV3__) || \ - defined(__BOARD_slowpandongle1__) || defined(__BOARD_slowpandongle2__) || \ + defined(__BOARD_slowpandongle1__) || defined(__BOARD_slowpandongle2__) || defined(__teenstep__) || \ defined(__BOARD_minimus__) || defined(__BOARD_minimus32__) cli(); // disable watchdog, if enabled @@ -103,7 +103,8 @@ void reset2bootloader(void) TIMSK0 = 0; TIMSK1 = 0; UCSR1B = 0; DDRB = 0; DDRC = 0; DDRD = 0; PORTB = 0; PORTC = 0; PORTD = 0; - #elif defined(__BOARD_hhd70dongle2__) || defined(__BOARD_hhd70dongle__) || defined(__BOARD_rda1846dongle__) || defined(__BOARD_culV3__) + #elif defined(__BOARD_hhd70dongle2__) || defined(__BOARD_hhd70dongle__) || defined(__BOARD_rda1846dongle__) || defined(__BOARD_culV3__) || \ + defined(__BOARD_slowpandongle2__) || defined(__teenstep__) EIMSK = 0; PCICR = 0; SPCR = 0; ACSR = 0; EECR = 0; ADCSRA = 0; TIMSK0 = 0; TIMSK1 = 0; TIMSK3 = 0; TIMSK4 = 0; UCSR1B = 0; TWCR = 0; DDRB = 0; DDRC = 0; DDRD = 0; DDRE = 0; DDRF = 0; TWCR = 0; diff --git a/usb-led/Makefile b/usb-led/Makefile index 542b007..3fa566f 100644 --- a/usb-led/Makefile +++ b/usb-led/Makefile @@ -21,7 +21,7 @@ ##
NAME := usb-led
-BOARD_TYPE := slowpandongle1
+BOARD_TYPE := teenstep
OBJ := $(NAME).o
LIBS := util led lufa-descriptor-usbserial usbio
EXTERNAL_LIBS := lufa
|