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