From efa28d0f5cca55b0dfecaddd0860ec3dfeab8bb0 Mon Sep 17 00:00:00 2001 From: fauxpark Date: Tue, 5 Nov 2019 11:05:03 +1100 Subject: Convert some PS2AVRGB boards to I2C WS2812 driver (#7241) * Convert some PS2AVRGB boards to I2C WS2812 driver * Fix Travis failure for bface --- keyboards/tgr/alice/alice.c | 39 +-------------------------------------- keyboards/tgr/alice/rules.mk | 19 +------------------ 2 files changed, 2 insertions(+), 56 deletions(-) (limited to 'keyboards/tgr/alice') diff --git a/keyboards/tgr/alice/alice.c b/keyboards/tgr/alice/alice.c index adb88fef0a..39aed2cf56 100644 --- a/keyboards/tgr/alice/alice.c +++ b/keyboards/tgr/alice/alice.c @@ -15,41 +15,4 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include - -#include "rgblight.h" - -#include "i2c_master.h" -#include "quantum.h" - -#ifdef RGBLIGHT_ENABLE -extern rgblight_config_t rgblight_config; - -void matrix_init_kb(void) { - i2c_init(); - // call user level keymaps, if any - matrix_init_user(); -} - -// custom RGB driver -void rgblight_set(void) { - if (!rgblight_config.enable) { - memset(led, 0, 3 * RGBLED_NUM); - } - - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); -} - -bool rgb_init = false; - -void matrix_scan_kb(void) { - // if LEDs were previously on before poweroff, turn them back on - if (rgb_init == false && rgblight_config.enable) { - i2c_transmit(0xb0, (uint8_t*)led, 3 * RGBLED_NUM, 100); - rgb_init = true; - } - - rgblight_task(); - matrix_scan_user(); -} -#endif +#include "alice.h" diff --git a/keyboards/tgr/alice/rules.mk b/keyboards/tgr/alice/rules.mk index aa141f7c3b..530e8ea329 100644 --- a/keyboards/tgr/alice/rules.mk +++ b/keyboards/tgr/alice/rules.mk @@ -1,18 +1,3 @@ -# Copyright 2017 Luiz Ribeiro -# -# 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 -# the Free Software Foundation, either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - # MCU name MCU = atmega32a @@ -34,8 +19,6 @@ CONSOLE_ENABLE = yes COMMAND_ENABLE = yes BACKLIGHT_ENABLE = no RGBLIGHT_ENABLE = yes -RGBLIGHT_CUSTOM_DRIVER = yes +WS2812_DRIVER = i2c OPT_DEFS = -DDEBUG_LEVEL=0 - -SRC += i2c_master.c -- cgit v1.2.3