summaryrefslogtreecommitdiff
path: root/keyboards/cannonkeys/satisfaction75/led.c
diff options
context:
space:
mode:
authorMario Medina <medina.mario45@gmail.com>2021-02-28 00:50:01 -0500
committerGitHub <noreply@github.com>2021-02-28 16:50:01 +1100
commit4a7a9e9951c2749d908e7a34c91f72a5fdb4ad39 (patch)
tree978fb1d795ab3b80c95468f83ab78ab7e8ce9919 /keyboards/cannonkeys/satisfaction75/led.c
parent81fd005af9abb16aed26653a8633631189b4e03f (diff)
Satisfaction 75 turn off backlight on suspend, restore config on wakeup (#11774)
* Satisfaction 75 turn off backlight on suspend, restore config on wakeup * Disable SLEEP_LED_ENABLE because it has no effect
Diffstat (limited to 'keyboards/cannonkeys/satisfaction75/led.c')
-rw-r--r--keyboards/cannonkeys/satisfaction75/led.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/keyboards/cannonkeys/satisfaction75/led.c b/keyboards/cannonkeys/satisfaction75/led.c
index 18ef06acf8..39ff4d784d 100644
--- a/keyboards/cannonkeys/satisfaction75/led.c
+++ b/keyboards/cannonkeys/satisfaction75/led.c
@@ -80,6 +80,21 @@ void backlight_init_ports(void) {
}
}
+void suspend_power_down_user(void) {
+ backlight_set(0);
+}
+void suspend_wakeup_init_user(void) {
+ if(kb_backlight_config.enable){
+ if(kb_backlight_config.breathing){
+ breathing_enable();
+ } else{
+ backlight_set(kb_backlight_config.level);
+ }
+ } else {
+ backlight_set(0);
+ }
+}
+
void backlight_set(uint8_t level) {
uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS));
if (level == 0) {