Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate led_update_kb implementations to DD #23985

Merged
merged 2 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions keyboards/bear_face/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@
"resync": true
}
},
"indicators": {
"caps_lock": "F7"
},
"matrix_pins": {
"cols": ["B5", "C7", "C6", "F0", "E6", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4"],
"rows": ["F5", "F6", "F4", "F1", "B0", "B6"]
Expand Down
34 changes: 0 additions & 34 deletions keyboards/bear_face/v1/v1.c

This file was deleted.

34 changes: 0 additions & 34 deletions keyboards/bear_face/v2/v2.c

This file was deleted.

29 changes: 0 additions & 29 deletions keyboards/dztech/bocc/bocc.c

This file was deleted.

4 changes: 4 additions & 0 deletions keyboards/dztech/bocc/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
"pin": "B7",
"levels": 5
},
"indicators": {
"caps_lock": "E6",
"on_state": 0
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
Expand Down
14 changes: 3 additions & 11 deletions keyboards/evyd13/gh80_3700/gh80_3700.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,24 +15,16 @@
*/
#include "quantum.h"

void led_init_ports(void) {
gpio_set_pin_output(E6);
void keyboard_pre_init_kb(void) {
gpio_set_pin_output(B1);
gpio_set_pin_output(D0);
gpio_set_pin_output(D1);
gpio_set_pin_output(F0);

gpio_write_pin_high(E6);
gpio_write_pin_high(B1);
gpio_write_pin_high(D0);
gpio_write_pin_high(D1);
gpio_write_pin_high(F0);
}

bool led_update_kb(led_t led_state) {
if(led_update_user(led_state)) {
gpio_write_pin(E6, !led_state.num_lock);
}

return true;
}
keyboard_pre_init_user();
}
4 changes: 4 additions & 0 deletions keyboards/evyd13/gh80_3700/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
"resync": true
}
},
"indicators": {
"num_lock": "E6",
"on_state": 0
},
"matrix_pins": {
"cols": ["B0", "D7", "D6", "D4"],
"rows": ["B3", "C7", "C6", "B6", "B5", "B4"]
Expand Down
32 changes: 0 additions & 32 deletions keyboards/exclusive/e85/hotswap/hotswap.c

This file was deleted.

4 changes: 4 additions & 0 deletions keyboards/exclusive/e85/hotswap/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
"levels": 6,
"breathing": true
},
"indicators": {
"caps_lock": "C7",
"scroll_lock": "B5"
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
Expand Down
28 changes: 0 additions & 28 deletions keyboards/fjlabs/bolsa65/bolsa65.c

This file was deleted.

3 changes: 3 additions & 0 deletions keyboards/fjlabs/bolsa65/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
"pid": "0x0001",
"device_version": "0.0.1"
},
"indicators": {
"caps_lock": "F7"
},
"matrix_pins": {
"cols": ["C7", "B1", "B2", "B3", "B7", "D0", "D1", "D2", "D3", "D5", "D4", "D6", "D7", "B4", "B5"],
"rows": ["F1", "F0", "F6", "F5", "F4"]
Expand Down
5 changes: 5 additions & 0 deletions keyboards/flx/virgo/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@
"pin": "B7",
"levels": 5
},
"indicators": {
"caps_lock": "E6",
"scroll_lock": "B2",
"on_state": 0
},
"rgblight": {
"saturation_steps": 8,
"brightness_steps": 8,
Expand Down
34 changes: 0 additions & 34 deletions keyboards/flx/virgo/virgo.c

This file was deleted.

15 changes: 0 additions & 15 deletions keyboards/handwired/colorlice/colorlice.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,3 @@ void suspend_wakeup_init_kb(void)
suspend_wakeup_init_user();
}
#endif

bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
// gpio_write_pin sets the pin high for 1 and low for 0.
// In this example the pins are inverted, setting
// it low/0 turns it on, and high/1 turns the LED off.
// This behavior depends on whether the LED is between the pin
// and VCC or the pin and GND.
gpio_write_pin(B2, !led_state.num_lock);
gpio_write_pin(C6, !led_state.caps_lock);
gpio_write_pin(B7, !led_state.scroll_lock);
}
return res;
}
6 changes: 6 additions & 0 deletions keyboards/handwired/colorlice/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,12 @@
"build": {
"lto": true
},
"indicators": {
"caps_lock": "C6",
"num_lock": "B2",
"scroll_lock": "B7",
"on_state": 0
},
"features": {
"bootmagic": true,
"command": false,
Expand Down
9 changes: 0 additions & 9 deletions keyboards/handwired/evk/v1_3/v1_3.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,3 @@ __attribute__((weak)) layer_state_t layer_state_set_user(layer_state_t state) {
gpio_write_pin(D5, layer_state_cmp(state, 1));
return state;
}

bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if (res) {
// gpio_write_pin sets the pin high for 1 and low for 0.
gpio_write_pin(D4, led_state.caps_lock);
}
return res;
}
6 changes: 6 additions & 0 deletions keyboards/handwired/retro_refit/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
"resync": true
}
},
"indicators": {
"caps_lock": "D0",
"num_lock": "D1",
"scroll_lock": "C6",
"on_state": 0
},
"matrix_pins": {
"cols": ["B0", "B1", "B2", "B3", "D2", "D3", "C7", "D5"],
"rows": ["D4", "D7", "B4", "B5", "B6", "F7", "F6", "F5", "F4", "F1", "F0"]
Expand Down
12 changes: 0 additions & 12 deletions keyboards/handwired/retro_refit/retro_refit.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "quantum.h"
#include "led.h"

void matrix_init_kb(void) {
// put your keyboard start-up code here
Expand All @@ -11,14 +10,3 @@ void matrix_init_kb(void) {

matrix_init_user();
};

bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if(res) {
gpio_write_pin(D0, !led_state.caps_lock);
gpio_write_pin(D1, !led_state.num_lock);
gpio_write_pin(C6, !led_state.scroll_lock);

}
return res;
}
5 changes: 5 additions & 0 deletions keyboards/handwired/selene/keyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
"pid": "0x0001",
"device_version": "0.0.1"
},
"indicators": {
"caps_lock": "A2",
"num_lock": "A0",
"scroll_lock": "A1"
},
"rgblight": {
"led_count": 50
},
Expand Down
Loading
Loading