X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=keyboards%2Fjj40%2Fjj40.c;h=51f5295f465dea9765224848cff27e43507330a0;hb=cb2f2fd258011e6637ed182f484a4317ac510db8;hp=136e023fa1f413f35122cfcf75e7f33b1b1a1e27;hpb=2f24ed1046b825b9b6d792e4f5767ed93de94a56;p=qmk_firmware.git diff --git a/keyboards/jj40/jj40.c b/keyboards/jj40/jj40.c index 136e023fa..51f5295f4 100644 --- a/keyboards/jj40/jj40.c +++ b/keyboards/jj40/jj40.c @@ -1,5 +1,6 @@ /* Copyright 2017 Luiz Ribeiro +Modified 2018 Kenneth A. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,7 +23,75 @@ along with this program. If not, see . #include "action_layer.h" #include "quantum.h" -__attribute__ ((weak)) +#include "i2c.h" + +#include "backlight.h" +#include "backlight_custom.h" + +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +#ifdef BACKLIGHT_ENABLE +/// Overrides functions in `quantum.c` +void backlight_init_ports(void) { + b_led_init_ports(); +} + +void backlight_task(void) { + b_led_task(); +} + +void backlight_set(uint8_t level) { + b_led_set(level); +} +#endif + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i=0; i