aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/cannonkeys/stm32f072/keyboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/cannonkeys/stm32f072/keyboard.h')
-rw-r--r--keyboards/cannonkeys/stm32f072/keyboard.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/keyboards/cannonkeys/stm32f072/keyboard.h b/keyboards/cannonkeys/stm32f072/keyboard.h
new file mode 100644
index 000000000..94c973d61
--- /dev/null
+++ b/keyboards/cannonkeys/stm32f072/keyboard.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include "quantum.h"
+
+typedef union {
+ uint8_t raw;
+ struct {
+ bool enable :1;
+ bool breathing : 1;
+ uint8_t level :6;
+ };
+} backlight_config_t;
+
+// Backlighting
+extern backlight_config_t kb_backlight_config;
+extern bool kb_backlight_breathing;
+void backlight_init_ports(void);
+void backlight_set(uint8_t level);
+bool is_breathing(void);
+void breathing_enable(void);
+void breathing_disable(void);
+void load_custom_config(void);
+void save_backlight_config_to_eeprom(void);