From 91b18e263f6373994613c290129e49f18e17cef1 Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 8 Apr 2019 18:53:15 +0100 Subject: [Keyboard] Refactor jj40 to current standards (#5574) * Refactor jj40 in line with current ps2avrgb template * Disable bootmagic lite as it seems to not work on atmega32a/bootloadHID * Add backlight pwm bodge till #4324 lands * Increase planck keymap compatibility --- keyboards/jj40/jj40.c | 61 +++++++++------------------------------------------ 1 file changed, 10 insertions(+), 51 deletions(-) (limited to 'keyboards/jj40/jj40.c') diff --git a/keyboards/jj40/jj40.c b/keyboards/jj40/jj40.c index 51f5295f4..26cfa6c06 100644 --- a/keyboards/jj40/jj40.c +++ b/keyboards/jj40/jj40.c @@ -18,53 +18,26 @@ along with this program. If not, see . #include "jj40.h" -#include - -#include "action_layer.h" -#include "quantum.h" +#ifdef RGBLIGHT_ENABLE -#include "i2c.h" +#include +#include "i2c_master.h" +#include "rgblight.h" -#include "backlight.h" -#include "backlight_custom.h" +extern rgblight_config_t rgblight_config; -// for keyboard subdirectory level init functions -// @Override void matrix_init_kb(void) { + i2c_init(); // 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