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