From 4d06d2835c87f3eed694493fb749527032a78ec2 Mon Sep 17 00:00:00 2001 From: Nick Brassel Date: Fri, 3 Jan 2020 09:58:34 +1100 Subject: Move CORTEX_ENABLE_WFI_IDLE=TRUE to rules.mk files. --- keyboards/handwired/onekey/bluepill/chconf.h | 4 ---- keyboards/handwired/onekey/bluepill/rules.mk | 4 ++++ keyboards/handwired/onekey/stm32f0_disco/chconf.h | 4 ---- keyboards/handwired/onekey/stm32f0_disco/rules.mk | 4 ++++ keyboards/handwired/onekey/teensy_32/chconf.h | 4 ---- keyboards/handwired/onekey/teensy_32/rules.mk | 4 ++++ keyboards/handwired/onekey/teensy_lc/chconf.h | 4 ---- keyboards/handwired/onekey/teensy_lc/rules.mk | 4 ++++ 8 files changed, 16 insertions(+), 16 deletions(-) (limited to 'keyboards/handwired/onekey') diff --git a/keyboards/handwired/onekey/bluepill/chconf.h b/keyboards/handwired/onekey/bluepill/chconf.h index bbd9b2da62..9299be587e 100644 --- a/keyboards/handwired/onekey/bluepill/chconf.h +++ b/keyboards/handwired/onekey/bluepill/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/onekey/bluepill/rules.mk b/keyboards/handwired/onekey/bluepill/rules.mk index 063f21f7fd..83a81a56b1 100644 --- a/keyboards/handwired/onekey/bluepill/rules.mk +++ b/keyboards/handwired/onekey/bluepill/rules.mk @@ -8,3 +8,7 @@ BOARD = STM32_F103_STM32DUINO DFU_ARGS = -d 1eaf:0003 -a2 -R DFU_SUFFIX_ARGS = -v 1eaf -p 0003 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/stm32f0_disco/chconf.h b/keyboards/handwired/onekey/stm32f0_disco/chconf.h index 99fa8ce398..89388dd5a3 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/chconf.h +++ b/keyboards/handwired/onekey/stm32f0_disco/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/onekey/stm32f0_disco/rules.mk b/keyboards/handwired/onekey/stm32f0_disco/rules.mk index fe5e3f824f..d8928e9ec8 100644 --- a/keyboards/handwired/onekey/stm32f0_disco/rules.mk +++ b/keyboards/handwired/onekey/stm32f0_disco/rules.mk @@ -1,2 +1,6 @@ # MCU name MCU = STM32F072 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/teensy_32/chconf.h b/keyboards/handwired/onekey/teensy_32/chconf.h index 3294ac7eee..1919fcb97c 100644 --- a/keyboards/handwired/onekey/teensy_32/chconf.h +++ b/keyboards/handwired/onekey/teensy_32/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/onekey/teensy_32/rules.mk b/keyboards/handwired/onekey/teensy_32/rules.mk index 97171611ef..2c411c0eb6 100644 --- a/keyboards/handwired/onekey/teensy_32/rules.mk +++ b/keyboards/handwired/onekey/teensy_32/rules.mk @@ -39,3 +39,7 @@ MCU = cortex-m4 # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 # I.e. 6 for Teensy LC; 7 for Teensy 3.x ARMV = 7 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE diff --git a/keyboards/handwired/onekey/teensy_lc/chconf.h b/keyboards/handwired/onekey/teensy_lc/chconf.h index 3294ac7eee..1919fcb97c 100644 --- a/keyboards/handwired/onekey/teensy_lc/chconf.h +++ b/keyboards/handwired/onekey/teensy_lc/chconf.h @@ -105,10 +105,6 @@ */ #define CH_CFG_NO_IDLE_THREAD FALSE -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - /** @} */ /*===========================================================================*/ diff --git a/keyboards/handwired/onekey/teensy_lc/rules.mk b/keyboards/handwired/onekey/teensy_lc/rules.mk index 7859f6d741..32ab07d9c1 100644 --- a/keyboards/handwired/onekey/teensy_lc/rules.mk +++ b/keyboards/handwired/onekey/teensy_lc/rules.mk @@ -39,3 +39,7 @@ MCU = cortex-m0plus # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 # I.e. 6 for Teensy LC; 7 for Teensy 3.x ARMV = 6 + + +# Enter lower-power sleep mode when on the ChibiOS idle thread +OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE -- cgit v1.2.3