diff options
author | cpldcpu <cpldcpu@gmail.com> | 2013-12-28 12:46:06 +0100 |
---|---|---|
committer | cpldcpu <cpldcpu@gmail.com> | 2013-12-28 12:46:06 +0100 |
commit | 1a38f02b1117442b137a4a210ed250ab8fd3de21 (patch) | |
tree | 15903862fb13c7e3986647e30314ceee05fc858d /firmware/bootloaderconfig.h | |
parent | 713142dceff2f12ebbb62f2196d8aed348504299 (diff) | |
download | micronucleus-1a38f02b1117442b137a4a210ed250ab8fd3de21.tar.gz micronucleus-1a38f02b1117442b137a4a210ed250ab8fd3de21.tar.bz2 micronucleus-1a38f02b1117442b137a4a210ed250ab8fd3de21.zip |
firmware: clean up LED code
Diffstat (limited to 'firmware/bootloaderconfig.h')
-rw-r--r-- | firmware/bootloaderconfig.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/firmware/bootloaderconfig.h b/firmware/bootloaderconfig.h index 479d268..a5b1f7d 100644 --- a/firmware/bootloaderconfig.h +++ b/firmware/bootloaderconfig.h @@ -208,6 +208,7 @@ these macros are defined, the boot loader uses them. * (This will wait for an USB SE0 reset from the host) * AUTO_EXIT_MS The bootloader will exit after this delay if no USB communication * from the host tool was received. + * Set to 0 to disable * * All values are approx. in milliseconds */ @@ -258,10 +259,15 @@ these macros are defined, the boot loader uses them. #define LED_PORT PORTB #define LED_PIN PB1 -#define LED_INIT(x) LED_PORT &=~_BV(LED_PIN); -#define LED_EXIT(x) LED_DDR &=~_BV(LED_PIN); -#define LED_MACRO(x) if ( x & 0xd ) {LED_DDR&=~_BV(LED_PIN);} else {LED_DDR|=_BV(LED_PIN);} - +#if LED_PRESENT + #define LED_INIT(x) LED_PORT &=~_BV(LED_PIN); + #define LED_EXIT(x) LED_DDR &=~_BV(LED_PIN); + #define LED_MACRO(x) if ( x & 0xd ) {LED_DDR&=~_BV(LED_PIN);} else {LED_DDR|=_BV(LED_PIN);} +#else + #define LED_INIT(x) + #define LED_EXIT(x) + #define LED_MACRO(x) +#endif /* ------------------------------------------------------------------------- */ #endif /* __bootloader_h_included__ */ |