2023-04-15 11:07:32 +00:00
|
|
|
#include "quantum.h"
|
2019-05-20 22:43:29 +00:00
|
|
|
|
2020-04-09 01:51:18 +00:00
|
|
|
__attribute__((weak))
|
2020-03-04 20:26:25 +00:00
|
|
|
void matrix_init_kb(void){
|
2024-05-03 05:21:29 +00:00
|
|
|
gpio_set_pin_output(F4);
|
|
|
|
gpio_write_pin_high(F4);
|
2020-03-04 20:26:25 +00:00
|
|
|
}
|
2019-05-20 22:43:29 +00:00
|
|
|
|
2020-04-09 01:51:18 +00:00
|
|
|
__attribute__((weak))
|
2020-03-04 20:26:25 +00:00
|
|
|
bool led_update_kb(led_t led_state) {
|
|
|
|
bool res = led_update_user(led_state);
|
|
|
|
if (res) {
|
2024-05-03 05:21:29 +00:00
|
|
|
// gpio_write_pin sets the pin high for 1 and low for 0.
|
2020-03-04 20:26:25 +00:00
|
|
|
// 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.
|
2024-05-03 05:21:29 +00:00
|
|
|
gpio_write_pin(F4, !led_state.caps_lock);
|
2020-03-04 20:26:25 +00:00
|
|
|
}
|
|
|
|
return res;
|
2019-05-20 22:43:29 +00:00
|
|
|
}
|