Skip to content

Commit

Permalink
Migrate led_update_kb implementations to DD
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr committed Jun 22, 2024
1 parent cb39df2 commit d5b6189
Show file tree
Hide file tree
Showing 45 changed files with 94 additions and 658 deletions.
5 changes: 5 additions & 0 deletions keyboards/ai03/vega/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@
"resync": true
}
},
"indicators": {
"caps_lock": "B7",
"scroll_lock": "A5",
"on_state": 0
},
"matrix_pins": {
"cols": ["B5", "A3", "A9", "A8", "B15", "B14", "B13", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A6"],
"rows": ["A1", "A2", "B3", "A15", "A10"]
Expand Down
37 changes: 0 additions & 37 deletions keyboards/ai03/vega/vega.c

This file was deleted.

28 changes: 0 additions & 28 deletions keyboards/bioi/g60/g60.c

This file was deleted.

4 changes: 4 additions & 0 deletions keyboards/bioi/g60/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"pin": "B7",
"levels": 12
},
"indicators": {
"caps_lock": "F0",
"on_state": 0
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
Expand Down
4 changes: 4 additions & 0 deletions keyboards/bioi/morgan65/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"pin": "B6",
"levels": 12
},
"indicators": {
"caps_lock": "F0",
"on_state": 0
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
Expand Down
28 changes: 0 additions & 28 deletions keyboards/bioi/morgan65/morgan65.c

This file was deleted.

4 changes: 4 additions & 0 deletions keyboards/bioi/s65/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
"pin": "B6",
"levels": 12
},
"indicators": {
"caps_lock": "F0",
"on_state": 0
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
Expand Down
27 changes: 0 additions & 27 deletions keyboards/bioi/s65/s65.c

This file was deleted.

14 changes: 0 additions & 14 deletions keyboards/clueboard/2x1800/2019/2019.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@
void matrix_init_kb(void) {
// Set our LED pins as output
gpio_set_pin_output(D6);
gpio_set_pin_output(B4);
gpio_set_pin_output(B5);
gpio_set_pin_output(B6);

// Set our Tilt Sensor pins as input
gpio_set_pin_input_high(SHAKE_PIN_A);
Expand Down Expand Up @@ -133,17 +130,6 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
return process_record_user(keycode, record);
}

bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
gpio_write_pin(B4, !led_state.num_lock);
gpio_write_pin(B5, !led_state.caps_lock);
gpio_write_pin(B6, !led_state.scroll_lock);
}

return res;
}

__attribute__((weak)) bool encoder_update_keymap(uint8_t index, bool clockwise) { return true; }
__attribute__((weak)) bool encoder_update_user(uint8_t index, bool clockwise) { return encoder_update_keymap(index, clockwise); }

Expand Down
6 changes: 6 additions & 0 deletions keyboards/clueboard/2x1800/2019/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
{"pin_a": "A1", "pin_b": "A0"}
]
},
"indicators": {
"caps_lock": "B5",
"num_lock": "B4",
"scroll_lock": "B6",
"on_state": 0
},
"layout_aliases": {
"LAYOUT": "LAYOUT_all"
},
Expand Down
6 changes: 6 additions & 0 deletions keyboards/duck/orion/v3/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@
"bootmagic": {
"matrix": [4, 10]
},
"indicators": {
"caps_lock": "B0",
"num_lock": "B4",
"scroll_lock": "D7",
"on_state": 0
},
"rgblight": {
"led_count": 18,
"animations": {
Expand Down
13 changes: 0 additions & 13 deletions keyboards/duck/orion/v3/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,20 +53,7 @@ __attribute__ ((weak))
void matrix_scan_user(void) {
}

void indicator_init_ports(void) {

// Num LED
gpio_set_pin_output(B4);

// Caps Lock
gpio_set_pin_output(B0);

// Scroll Lock
gpio_set_pin_output(D7);
}

void matrix_init(void) {
indicator_init_ports();
unselect_cols();
init_rows();

Expand Down
39 changes: 0 additions & 39 deletions keyboards/duck/orion/v3/v3.c

This file was deleted.

3 changes: 3 additions & 0 deletions keyboards/ealdin/quadrant/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
{"pin_a": "D5", "pin_b": "F1"}
]
},
"indicators": {
"caps_lock": "F0"
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
Expand Down
13 changes: 0 additions & 13 deletions keyboards/ealdin/quadrant/quadrant.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,3 @@ bool encoder_update_kb(uint8_t index, bool clockwise) {
}
return true;
}

void keyboard_pre_init_kb(void) {
gpio_set_pin_output(F0);

keyboard_pre_init_user();
}

bool led_update_kb(led_t led_state) {
if (led_update_user(led_state)) {
gpio_write_pin(F0, led_state.caps_lock);
}
return true;
}
3 changes: 3 additions & 0 deletions keyboards/handwired/jtallbean/split_65/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@
"rows": ["F4", "F1", "F0", "C7", "B6"]
},
"diode_direction": "COL2ROW",
"indicators": {
"caps_lock": "B0"
},
"split": {
"enabled": true,
"soft_serial_pin": "D0",
Expand Down
43 changes: 0 additions & 43 deletions keyboards/handwired/jtallbean/split_65/split_65.c

This file was deleted.

4 changes: 4 additions & 0 deletions keyboards/handwired/prime_exl_plus/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
"pid": "0x6579",
"device_version": "0.0.1"
},
"indicators": {
"caps_lock": "B0",
"num_lock": "B1"
},
"rgblight": {
"led_count": 10,
"animations": {
Expand Down
Loading

0 comments on commit d5b6189

Please sign in to comment.