From f3456ea1cfc56ebfa1fcea33be93856c0a71df37 Mon Sep 17 00:00:00 2001 From: cpldcpu Date: Mon, 4 Nov 2013 00:22:17 +0100 Subject: Updated USB Driver, nanite, oscal --- firmware/bootloaderconfig.h | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'firmware/bootloaderconfig.h') diff --git a/firmware/bootloaderconfig.h b/firmware/bootloaderconfig.h index a23ea5a..d78a614 100644 --- a/firmware/bootloaderconfig.h +++ b/firmware/bootloaderconfig.h @@ -207,16 +207,25 @@ these macros are defined, the boot loader uses them. /* max 6200ms to not overflow idlePolls variable */ -#define AUTO_EXIT_MS 5000 +#define AUTO_EXIT_MS 6000 //#define AUTO_EXIT_CONDITION() (idlePolls > (AUTO_EXIT_MS * 10UL)) // uncomment for chips with clkdiv8 enabled in fuses //#define LOW_POWER_MODE 1 // restore cpu speed calibration back to 8/16mhz instead of 8.25/16.5mhz -//#define RESTORE_OSCCAL 1 +// #define RESTORE_OSCCAL // set clock prescaler to a value before running user program //#define SET_CLOCK_PRESCALER _BV(CLKPS0) /* divide by 2 for 8mhz */ +// Specific configuration for the Nanite +// Nanite has both LED and tactile button connected to control pin. +// LED will turn on when output=low and act as external pull up otherwise +// button shorts to GND + +// #define NANITE +#define NANITE_CTRLPIN PB5 + + #ifdef BUILD_JUMPER_MODE #define START_JUMPER_PIN 5 #define digitalRead(pin) (PINB & _BV(pin)) @@ -234,6 +243,13 @@ these macros are defined, the boot loader uses them. PORTB = 0; } #endif /* __ASSEMBLER__ */ + +#elif defined NANITE + #define bootLoaderInit() + #define bootLoaderExit() + #define bootLoaderCondition() (++idlePolls < (AUTO_EXIT_MS * 10UL)) + #define bootLoaderStartCondition() (!(PINB & _BV(NANITE_CTRLPIN))) + #else #define bootLoaderInit() #define bootLoaderExit() -- cgit v1.2.3