Add sleep to Promicro
This commit is contained in:
@@ -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"
|
||||||
|
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user