wake up pin working for the wake up
This commit is contained in:
@@ -22,7 +22,7 @@ impl From<StopEntry> for u8 {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn enter_stop0() -> ! {
|
||||
pub fn enter_stop0() {
|
||||
unsafe extern "C" {
|
||||
fn rust_LL_PWR_SetPowerMode(mode: u32);
|
||||
}
|
||||
@@ -35,12 +35,11 @@ pub fn enter_stop0() -> ! {
|
||||
let mut core = Peripherals::steal();
|
||||
core.SCB.set_sleepdeep();
|
||||
asm::wfi();
|
||||
core.SCB.clear_sleepdeep();
|
||||
}
|
||||
|
||||
cortex_m::asm::udf();
|
||||
}
|
||||
|
||||
pub fn enter_stop1(entry: StopEntry) -> ! {
|
||||
pub fn enter_stop1(entry: StopEntry) {
|
||||
unsafe extern "C" {
|
||||
fn HAL_PWREx_EnterSTOP1Mode(entry: u8);
|
||||
}
|
||||
@@ -48,11 +47,9 @@ pub fn enter_stop1(entry: StopEntry) -> ! {
|
||||
unsafe {
|
||||
HAL_PWREx_EnterSTOP1Mode(entry.into());
|
||||
}
|
||||
|
||||
cortex_m::asm::udf()
|
||||
}
|
||||
|
||||
pub fn enter_stop2(entry: StopEntry) -> ! {
|
||||
pub fn enter_stop2(entry: StopEntry) {
|
||||
unsafe extern "C" {
|
||||
fn HAL_PWREx_EnterSTOP2Mode(entry: u8);
|
||||
}
|
||||
@@ -60,11 +57,9 @@ pub fn enter_stop2(entry: StopEntry) -> ! {
|
||||
unsafe {
|
||||
HAL_PWREx_EnterSTOP2Mode(entry.into());
|
||||
}
|
||||
|
||||
cortex_m::asm::udf()
|
||||
}
|
||||
|
||||
pub fn enter_stop3(entry: StopEntry) -> ! {
|
||||
pub fn enter_stop3(entry: StopEntry) {
|
||||
unsafe extern "C" {
|
||||
fn HAL_PWREx_EnterSTOP3Mode(entry: u8);
|
||||
}
|
||||
@@ -72,6 +67,4 @@ pub fn enter_stop3(entry: StopEntry) -> ! {
|
||||
unsafe {
|
||||
HAL_PWREx_EnterSTOP3Mode(entry.into());
|
||||
}
|
||||
|
||||
cortex_m::asm::udf()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user