mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[ion] Shutdown all GPIO used in sleep mode
Change-Id: I893e4c9ae19c6e5e897837888ad13aefac3bacef
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user