From da9bb590551e4e40552f301852074dffccd2c29d Mon Sep 17 00:00:00 2001 From: zvecr Date: Mon, 8 Apr 2019 19:35:47 +0100 Subject: [Keyboard] Refactor jj4x4 to current standards (#5567) * Refactor 4x4 in line with current ps2avrgb template * Add backlight pwm bodge till #4324 lands * Disable bootmagic lite as it seems to not work on atmega32a/bootloadHID --- keyboards/jj4x4/jj4x4.c | 61 ++++++++----------------------------------------- 1 file changed, 10 insertions(+), 51 deletions(-) (limited to 'keyboards/jj4x4/jj4x4.c') diff --git a/keyboards/jj4x4/jj4x4.c b/keyboards/jj4x4/jj4x4.c index 6fbff7afba..265508b2d5 100644 --- a/keyboards/jj4x4/jj4x4.c +++ b/keyboards/jj4x4/jj4x4.c @@ -18,53 +18,26 @@ along with this program. If not, see . #include "jj4x4.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