aboutsummaryrefslogtreecommitdiff
path: root/keyboards/work_louder/rgb_functions.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/work_louder/rgb_functions.c')
-rw-r--r--keyboards/work_louder/rgb_functions.c55
1 files changed, 7 insertions, 48 deletions
diff --git a/keyboards/work_louder/rgb_functions.c b/keyboards/work_louder/rgb_functions.c
index bc31aab7c1..15d0f432a0 100644
--- a/keyboards/work_louder/rgb_functions.c
+++ b/keyboards/work_louder/rgb_functions.c
@@ -14,10 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "rgb_functions.h"
-#include <stdint.h>
-#include "quantum.h"
-#include "action.h"
#include "rgblight.h"
#include "rgb_matrix.h"
@@ -26,53 +22,16 @@
#define WS2812_DI_PIN RGBLIGHT_DI_PIN
#define ws2812_init ws2812_rgb_init
-#define ws2812_setleds ws2812_rgb_setleds
+#define ws2812_set_color ws2812_rgb_set_color
+#define ws2812_set_color_all ws2812_rgb_set_color_all
+#define ws2812_flush ws2812_rgb_flush
#include "ws2812_bitbang.c"
const rgblight_driver_t rgblight_driver = {
- .init = ws2812_init,
- .setleds = ws2812_setleds,
+ .init = ws2812_init,
+ .set_color = ws2812_set_color,
+ .set_color_all = ws2812_set_color_all,
+ .flush = ws2812_flush,
};
#endif
-
-#ifdef RGB_MATRIX_ENABLE
-bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
- if (!process_record_user(keycode, record)) { return false; }
-
- if (record->event.pressed) {
- switch(keycode) {
- case RGB_MATRIX_TOGGLE: // toggle rgb matrix
- rgb_matrix_toggle();
- return false;
- case RGB_MATRIX_MODE_INC:
- rgb_matrix_step();
- return false;
- case RGB_MATRIX_MODE_DEC:
- rgb_matrix_step_reverse();
- return false;
- case RGB_MATRIX_HUE_INC:
- rgb_matrix_increase_hue();
- return false;
- case RGB_MATRIX_HUE_DEC:
- rgb_matrix_decrease_hue();
- return false;
- case RGB_MATRIX_SAT_INC:
- rgb_matrix_increase_sat();
- return false;
- case RGB_MATRIX_SAT_DEC:
- rgb_matrix_decrease_sat();
- return false;
- case RGB_MATRIX_VAL_INC:
- rgb_matrix_increase_val();
- return false;
- case RGB_MATRIX_VAL_DEC:
- rgb_matrix_decrease_val();
- return false;
- default:
- break;
- }
- }
- return true;
-}
-#endif