Skip to content

Commit bd082fa

Browse files
jesserodladyada
authored andcommitted
Do not initialize all pins to INPUT (arduino#98)
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)
1 parent d9d87d6 commit bd082fa

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

cores/arduino/wiring.c

+5
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,16 @@ void init( void )
102102
#endif
103103
#endif
104104

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

111116
// Initialize Analog Controller
112117
// Setting clock

0 commit comments

Comments
 (0)