[ion] Shutdown all GPIO used in sleep mode

Change-Id: I893e4c9ae19c6e5e897837888ad13aefac3bacef
This commit is contained in:
Émilie Feral
2017-04-13 10:07:14 +02:00
parent 94b6ad3488
commit 4cf2279af8
2 changed files with 5 additions and 1 deletions

View File

@@ -39,7 +39,8 @@ void init() {
}
void shutdown() {
GPIOC.ODR()->set(6, false);
GPIOC.MODER()->setMode(6, GPIO::MODER::Mode::Analog);
GPIOC.PUPDR()->setPull(6, GPIO::PUPDR::Pull::None);
}
void suspend() {

View File

@@ -75,6 +75,9 @@ void initGPIO() {
}
void shutdown() {
ChargingGPIO.MODER()->setMode(ChargingPin, GPIO::MODER::Mode::Analog);
ChargingGPIO.PUPDR()->setPull(ChargingPin, GPIO::PUPDR::Pull::None);
// Disable the ADC
ADC.CR2()->setADON(false);
RCC.APB2ENR()->setADC1EN(false);