mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-27 01:29:58 +01:00
[ion] Set all GPIOs to analog/non-pulled in release mode
Change-Id: Ie7dedc1089b0023a124af04a4d016cc9a843e28b
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user