#include "meridian.h"
void keyboard_pre_init_kb(void){
setPinOutput(B12);
keyboard_pre_init_user();
}
__attribute__((weak))
void keyboard_post_init_user(void) {
rgblight_setrgb_at(0, 0, 0, 0); rgblight_setrgb_at(0, 0, 0, 1); rgblight_setrgb_at(0, 0, 0, 2); }
bool led_update_kb(led_t led_state) {
bool res = led_update_user(led_state);
if (res) {
if (led_state.caps_lock) {
rgblight_setrgb_at(0, 255, 0, 0); } else {
rgblight_setrgb_at(0, 0, 0, 0);
}
if (led_state.num_lock) {
rgblight_setrgb_at(0, 0, 255, 1); } else {
rgblight_setrgb_at(0, 0, 0, 1);
}
if (led_state.scroll_lock) {
rgblight_setrgb_at(255, 0, 0, 2); } else {
rgblight_setrgb_at(0, 0, 0, 2);
}
}
return res;
}