mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-07-21 15:12:02 +00:00
avr/suspend: Add DISABLE_AVR_DEEP_SLEEP option
This commit is contained in:
parent
50b12ece13
commit
ae97f31d23
@ -74,6 +74,7 @@ OTHER_OPTION_NAMES = \
|
||||
WATCHDOG_ENABLE \
|
||||
ERGOINU \
|
||||
NO_USB_STARTUP_CHECK \
|
||||
DISABLE_AVR_DEEP_SLEEP \
|
||||
DISABLE_PROMICRO_LEDs \
|
||||
MITOSIS_DATAGROK_BOTTOMSPACE \
|
||||
MITOSIS_DATAGROK_SLOWUART \
|
||||
|
@ -29,6 +29,7 @@
|
||||
"COMBO_TERM": {"info_key": "combo.term", "value_type": "int"},
|
||||
"DEBOUNCE": {"info_key": "debounce", "value_type": "int"},
|
||||
"DIODE_DIRECTION": {"info_key": "diode_direction"},
|
||||
"DISABLE_AVR_DEEP_SLEEP": {"info_key": "disable_avr_deep_sleep", "value_type": "bool"},
|
||||
"DOUBLE_TAP_SHIFT_TURNS_ON_CAPS_WORD": {"info_key": "caps_word.double_tap_shift_turns_on", "value_type": "bool"},
|
||||
"FORCE_NKRO": {"info_key": "usb.force_nkro", "value_type": "bool"},
|
||||
"DYNAMIC_KEYMAP_EEPROM_MAX_ADDR": {"info_key": "dynamic_keymap.eeprom_max_addr", "value_type": "int"},
|
||||
|
@ -455,6 +455,8 @@ Use these to enable or disable building certain features. The more you have enab
|
||||
* Forces the keyboard to wait for a USB connection to be established before it starts up
|
||||
* `NO_USB_STARTUP_CHECK`
|
||||
* Disables usb suspend check after keyboard startup. Usually the keyboard waits for the host to wake it up before any tasks are performed. This is useful for split keyboards as one half will not get a wakeup call but must send commands to the master.
|
||||
* `DISABLE_AVR_DEEP_SLEEP`
|
||||
* Disables AVR deep sleep. Similar to `NO_SUSPEND_POWER_DOWN` with the suspend routines executed, so backlight, audio, and OLED will be still turned off during sleep.
|
||||
* `DEFERRED_EXEC_ENABLE`
|
||||
* Enables deferred executor support -- timed delays before callbacks are invoked. See [deferred execution](custom_quantum_functions.md#deferred-execution) for more information.
|
||||
* `DYNAMIC_TAPPING_TERM_ENABLE`
|
||||
|
@ -13,9 +13,7 @@
|
||||
# include "vusb.h"
|
||||
#endif
|
||||
|
||||
// TODO: This needs some cleanup
|
||||
|
||||
#if !defined(NO_SUSPEND_POWER_DOWN) && defined(WDT_vect)
|
||||
#if !defined(NO_SUSPEND_POWER_DOWN) && !defined(DISABLE_AVR_DEEP_SLEEP) && defined(WDT_vect)
|
||||
|
||||
// clang-format off
|
||||
#define wdt_intr_enable(value) \
|
||||
@ -105,7 +103,7 @@ void suspend_power_down(void) {
|
||||
|
||||
#ifndef NO_SUSPEND_POWER_DOWN
|
||||
// Enter sleep state if possible (ie, the MCU has a watchdog timeout interrupt)
|
||||
# if defined(WDT_vect)
|
||||
# if defined(WDT_vect) && !defined(DISABLE_AVR_DEEP_SLEEP)
|
||||
power_down(WDTO_15MS);
|
||||
# endif
|
||||
#endif
|
||||
|
@ -68,6 +68,10 @@ ifeq ($(strip $(NO_USB_STARTUP_CHECK)), yes)
|
||||
TMK_COMMON_DEFS += -DNO_USB_STARTUP_CHECK
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(DISABLE_AVR_DEEP_SLEEP)), yes)
|
||||
TMK_COMMON_DEFS += -DDISABLE_AVR_DEEP_SLEEP
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(JOYSTICK_SHARED_EP)), yes)
|
||||
TMK_COMMON_DEFS += -DJOYSTICK_SHARED_EP
|
||||
SHARED_EP_ENABLE = yes
|
||||
|
Loading…
Reference in New Issue
Block a user