summaryrefslogtreecommitdiff
path: root/keyboards/planck/ez/ez.h
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2019-08-13 10:28:12 -0700
committerGitHub <noreply@github.com>2019-08-13 10:28:12 -0700
commit547fbe769c684745195a53baf9f62730ceea804d (patch)
tree5fa8550d2d5947b27e2f0c04e1730431eaaf6720 /keyboards/planck/ez/ez.h
parent50045624411df31968f7e2d2996ad342d689fe4f (diff)
downloadqmk_firmware-547fbe769c684745195a53baf9f62730ceea804d.tar.gz
qmk_firmware-547fbe769c684745195a53baf9f62730ceea804d.zip
Enable PWM Support for Planck EZ Indicator Lights (#6473)
* remove led layer code * enable PWM on STM32F303 * Unusable PWM code * Updated PWM Stuff? * PWM Semi-working * Both LEDs working at the same time * Update names * Add led level functions * Add LED levels and persistent settings * Revert change due to issues with timing related code * Review feedback and minor cleanup
Diffstat (limited to 'keyboards/planck/ez/ez.h')
-rw-r--r--keyboards/planck/ez/ez.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/keyboards/planck/ez/ez.h b/keyboards/planck/ez/ez.h
index 55c4032422..e2ddaf3cec 100644
--- a/keyboards/planck/ez/ez.h
+++ b/keyboards/planck/ez/ez.h
@@ -50,3 +50,24 @@ LAYOUT_planck_1x2uC( \
#define KEYMAP LAYOUT_ortho_4x12
#define LAYOUT_planck_mit LAYOUT_planck_1x2uC
#define LAYOUT_planck_grid LAYOUT_ortho_4x12
+
+void planck_ez_right_led_on(void);
+void planck_ez_right_led_off(void);
+void planck_ez_right_led_level(uint8_t level);
+void planck_ez_left_led_on(void);
+void planck_ez_left_led_off(void);
+void planck_ez_left_led_level(uint8_t level);
+
+enum planck_ez_keycodes {
+ LED_LEVEL = SAFE_RANGE,
+ EZ_SAFE_RANGE,
+};
+
+typedef union {
+ uint32_t raw;
+ struct {
+ uint8_t led_level :3;
+ };
+} keyboard_config_t;
+
+extern keyboard_config_t keyboard_config;