Add sleep to Promicro

This commit is contained in:
2026-05-01 16:12:48 +03:00
parent fea32045c8
commit 2b423aba72
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -1169,7 +1169,7 @@
#define HAS_RF_SWITCH_RX_TX true #define HAS_RF_SWITCH_RX_TX true
#define DIO2_AS_RF_SWITCH true #define DIO2_AS_RF_SWITCH true
#define OCP_TUNED 0x38 #define OCP_TUNED 0x38
#define HAS_SLEEP false #define HAS_SLEEP true
#define BLE_MANUFACTURER "DIY" #define BLE_MANUFACTURER "DIY"
#define BLE_MODEL "ProMicro" #define BLE_MODEL "ProMicro"
+6
View File
@@ -1816,6 +1816,12 @@ void sleep_now() {
delay(2000); delay(2000);
analogWrite(PIN_VEXT_EN, 0); analogWrite(PIN_VEXT_EN, 0);
delay(100); delay(100);
#elif BOARD_MODEL == BOARD_PROMICRO
#if HAS_DISPLAY
display_intensity = 0;
update_display(true);
#endif
delay(100);
#endif #endif
sd_power_gpregret_set(0, 0x6d); sd_power_gpregret_set(0, 0x6d);
nrf_gpio_cfg_sense_input(pin_btn_usr1, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW); nrf_gpio_cfg_sense_input(pin_btn_usr1, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW);