Browse Source

Don't set LED_PIN as an output if it's not used.
http://code.google.com/p/optiboot/issues/detail?id=68

westfw 12 years ago
parent
commit
0ee526aa81
1 changed files with 2 additions and 0 deletions
  1. 2 0
      optiboot/bootloaders/optiboot/optiboot.c

+ 2 - 0
optiboot/bootloaders/optiboot/optiboot.c

@@ -421,8 +421,10 @@ int main(void) {
   // Set up watchdog to trigger after 500ms
   watchdogConfig(WATCHDOG_1S);
 
+#if (LED_START_FLASHES > 0) || defined(LED_DATA_FLASH)
   /* Set LED pin as output */
   LED_DDR |= _BV(LED);
+#endif
 
 #ifdef SOFT_UART
   /* Set TX pin as output */