diff options
Diffstat (limited to 'keyboards/panc60/panc60.c')
| -rw-r--r-- | keyboards/panc60/panc60.c | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/keyboards/panc60/panc60.c b/keyboards/panc60/panc60.c index 6bd16a4bd..a200b2587 100644 --- a/keyboards/panc60/panc60.c +++ b/keyboards/panc60/panc60.c | |||
| @@ -16,30 +16,19 @@ | |||
| 16 | 16 | ||
| 17 | #include "panc60.h" | 17 | #include "panc60.h" |
| 18 | 18 | ||
| 19 | void backlight_init_ports(void) { | 19 | void keyboard_pre_init_kb(void) { |
| 20 | setPinOutput(D0); | 20 | led_init_ports(); |
| 21 | setPinOutput(D1); | 21 | keyboard_pre_init_user(); |
| 22 | setPinOutput(D4); | 22 | } |
| 23 | setPinOutput(D6); | ||
| 24 | 23 | ||
| 25 | writePinLow(D0); | 24 | void led_init_ports(void) { |
| 26 | writePinLow(D1); | 25 | setPinOutput(D1); |
| 27 | writePinLow(D4); | 26 | writePinHigh(D1); |
| 28 | writePinLow(D6); | ||
| 29 | } | 27 | } |
| 30 | 28 | ||
| 31 | void backlight_set(uint8_t level) { | 29 | bool led_update_kb(led_t led_state) { |
| 32 | if (level == 0) { | 30 | if (led_update_user(led_state)) { |
| 33 | // Turn out the lights | 31 | writePin(D1, !led_state.caps_lock); |
| 34 | writePinLow(D0); | 32 | } |
| 35 | writePinLow(D1); | 33 | return true; |
| 36 | writePinLow(D4); | ||
| 37 | writePinLow(D6); | ||
| 38 | } else { | ||
| 39 | // Turn on the lights | ||
| 40 | writePinHigh(D0); | ||
| 41 | writePinHigh(D1); | ||
| 42 | writePinHigh(D4); | ||
| 43 | writePinHigh(D6); | ||
| 44 | } | ||
| 45 | } | 34 | } |
