summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--software/defines.mk8
-rw-r--r--software/lib/util.c9
2 files changed, 16 insertions, 1 deletions
diff --git a/software/defines.mk b/software/defines.mk
index ba30ee8..e0f264c 100644
--- a/software/defines.mk
+++ b/software/defines.mk
@@ -120,6 +120,14 @@ ifeq ($(BOARD_TYPE),teenstep)
PROG := DFU
LUFA_BOARD = NONE
endif
+ifeq ($(BOARD_TYPE),rhmixxx)
+ MCU := at90usb647
+ ARCH = AVR8
+ F_CPU := 16000000
+ F_USB = $(F_CPU)
+ PROG := DFU
+ LUFA_BOARD = NONE
+endif
ifeq ($(BOARD_TYPE),arduinoUno)
MCU := atmega328p
ARCH = AVR8
diff --git a/software/lib/util.c b/software/lib/util.c
index 104f2b6..c99c0f7 100644
--- a/software/lib/util.c
+++ b/software/lib/util.c
@@ -66,6 +66,8 @@ void jtag_disable(void)
#define BOOTLOADER_VEC 0x3800
#elif defined(__BOARD_slowpandongle1__) || defined(__BOARD_slowpandongle2__) || defined(__BOARD_teenstep__)
#define BOOTLOADER_VEC 0x3800
+#elif defined(__BOARD_rhmixxx__)
+ #define BOOTLOADER_VEC 0x7800
#else
#define BOOTLOADER_VEC 0x0000
#endif
@@ -78,7 +80,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_teenstep__) || \
- defined(__BOARD_minimus__) || defined(__BOARD_minimus32__)
+ defined(__BOARD_rhmixxx__) || defined(__BOARD_minimus__) || defined(__BOARD_minimus32__)
cli();
// disable watchdog, if enabled
// disable all peripherals
@@ -122,6 +124,11 @@ void reset2bootloader(void)
TIMSK0 = 0; TIMSK1 = 0; TIMSK3 = 0; TIMSK4 = 0; UCSR1B = 0; TWCR = 0;
DDRB = 0; DDRC = 0; DDRD = 0; DDRE = 0; DDRF = 0; TWCR = 0;
PORTB = 0; PORTC = 0; PORTD = 0; PORTE = 0; PORTF = 0;
+ #elif defined(__BOARD_rhmixxx__)
+ EIMSK = 0; PCICR = 0; SPCR = 0; ACSR = 0; EECR = 0; ADCSRA = 0;
+ TIMSK0 = 0; TIMSK1 = 0; TIMSK2 = 0; TIMSK3 = 0; UCSR1B = 0; TWCR = 0;
+ DDRA = 0; DDRB = 0; DDRC = 0; DDRD = 0; DDRE = 0; DDRF = 0;
+ PORTA = 0; PORTB = 0; PORTC = 0; PORTD = 0; PORTE = 0; PORTF = 0;
#endif
start_bootloader();
#endif