[ion] Set all GPIOs to analog/non-pulled in release mode

Change-Id: Ie7dedc1089b0023a124af04a4d016cc9a843e28b
This commit is contained in:
Romain Goyet
2017-01-25 10:55:00 +01:00
parent 895b312b51
commit caea1fe4cb

View File

@@ -59,10 +59,15 @@ void initFPU() {
void init() {
initClocks();
#ifndef DEBUG
/* In debug mode, we want to keep the SWD port configured as such.
* In release mode, we're setting all the inputs to analog, non-pulled state
* to save power. */
for (int g=0; g<5; g++) {
GPIO(g).MODER()->set(0xFFFFFFFF); // All to "Analog"
GPIO(g).PUPDR()->set(0x00000000); // All to "None"
}
#endif
initPeripherals();
}