summaryrefslogtreecommitdiffstats
path: root/firmware/bootloaderconfig.h
diff options
context:
space:
mode:
authorcpldcpu <cpldcpu@gmail.com>2013-11-04 00:22:17 +0100
committercpldcpu <cpldcpu@gmail.com>2013-11-04 00:22:17 +0100
commitf3456ea1cfc56ebfa1fcea33be93856c0a71df37 (patch)
tree40fdff10bbd1bb0229cbb27062790ea87a18c041 /firmware/bootloaderconfig.h
parent5b7617bfb1763f14a9e1e8792447d75cd076d2fa (diff)
downloadmicronucleus-f3456ea1cfc56ebfa1fcea33be93856c0a71df37.tar.gz
micronucleus-f3456ea1cfc56ebfa1fcea33be93856c0a71df37.tar.bz2
micronucleus-f3456ea1cfc56ebfa1fcea33be93856c0a71df37.zip
Updated USB Driver, nanite, oscal
Diffstat (limited to 'firmware/bootloaderconfig.h')
-rw-r--r--firmware/bootloaderconfig.h20
1 files changed, 18 insertions, 2 deletions
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()