Skip to content

Commit

Permalink
Do not initialize all pins to INPUT
Browse files Browse the repository at this point in the history
Comment out the initialization of all SAMD21 pins to INPUT to allow them to remain tri-stated by default.   

See adafruit/Adafruit_SleepyDog#17 (comment)
  • Loading branch information
jesserod authored Apr 17, 2019
1 parent d9d87d6 commit 544387b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cores/arduino/wiring.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,16 @@ void init( void )
#endif
#endif

/*
Commented out to leave pins in default tri-state. This is
aimed at avoiding power consumption in DeepSleep.
// Setup all pins (digital and analog) in INPUT mode (default is nothing)
for (uint32_t ul = 0 ; ul < NUM_DIGITAL_PINS ; ul++ )
{
pinMode( ul, INPUT ) ;
}
*/

// Initialize Analog Controller
// Setting clock
Expand Down

0 comments on commit 544387b

Please sign in to comment.