Skip to content

Commit 816f3f8

Browse files
authored
Merge pull request #447 from fdlamotte/stm32_halt_reset
stm32: implement halt and reset
2 parents 55ff69b + 8ccd4f3 commit 816f3f8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/helpers/stm32/STM32Board.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ class STM32Board : public mesh::MainBoard {
2323
}
2424

2525
void reboot() override {
26+
NVIC_SystemReset();
27+
}
28+
29+
void powerOff() override {
30+
HAL_PWREx_DisableInternalWakeUpLine();
31+
__disable_irq();
32+
HAL_PWREx_EnterSHUTDOWNMode();
2633
}
2734

2835
#if defined(P_LORA_TX_LED)

0 commit comments

Comments
 (0)