Parcourir la 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 il y a 12 ans
Parent
commit
0ee526aa81
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  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 */