summaryrefslogtreecommitdiffstats
path: root/keyboards/work_louder
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/work_louder')
-rw-r--r--keyboards/work_louder/encoder_actions.c68
-rw-r--r--keyboards/work_louder/encoder_actions.h21
-rw-r--r--keyboards/work_louder/loop/config.h18
-rw-r--r--keyboards/work_louder/loop/info.json9
-rw-r--r--keyboards/work_louder/loop/keymaps/via/keymap.c38
-rw-r--r--keyboards/work_louder/loop/keymaps/via/rules.mk3
-rw-r--r--keyboards/work_louder/loop/loop.c2
-rw-r--r--keyboards/work_louder/loop/loop.h1
-rw-r--r--keyboards/work_louder/loop/rev1/config.h6
-rw-r--r--keyboards/work_louder/loop/rev1/info.json5
-rw-r--r--keyboards/work_louder/loop/rev1/rules.mk0
-rw-r--r--keyboards/work_louder/loop/rev3/config.h6
-rw-r--r--keyboards/work_louder/loop/rev3/info.json5
-rw-r--r--keyboards/work_louder/loop/rev3/rules.mk0
-rw-r--r--keyboards/work_louder/loop/rules.mk2
-rw-r--r--keyboards/work_louder/micro/info.json4
-rw-r--r--keyboards/work_louder/micro/micro.c2
-rw-r--r--keyboards/work_louder/nano/config.h22
-rw-r--r--keyboards/work_louder/nano/info.json10
-rw-r--r--keyboards/work_louder/nano/keymaps/via/keymap.c39
-rw-r--r--keyboards/work_louder/nano/keymaps/via/rules.mk3
-rw-r--r--keyboards/work_louder/nano/nano.c2
-rw-r--r--keyboards/work_louder/nano/nano.h1
-rw-r--r--keyboards/work_louder/rgb_functions.c154
-rw-r--r--keyboards/work_louder/work_board/config.h20
-rw-r--r--keyboards/work_louder/work_board/info.json9
-rw-r--r--keyboards/work_louder/work_board/keymaps/default/keymap.c170
-rw-r--r--keyboards/work_louder/work_board/keymaps/via/keymap.c48
-rw-r--r--keyboards/work_louder/work_board/keymaps/via/rules.mk3
-rw-r--r--keyboards/work_louder/work_board/rev1/config.h6
-rw-r--r--keyboards/work_louder/work_board/rev1/info.json5
-rw-r--r--keyboards/work_louder/work_board/rev1/rules.mk0
-rw-r--r--keyboards/work_louder/work_board/rev3/config.h6
-rw-r--r--keyboards/work_louder/work_board/rev3/info.json5
-rw-r--r--keyboards/work_louder/work_board/rev3/rules.mk0
-rw-r--r--keyboards/work_louder/work_board/rules.mk2
-rw-r--r--keyboards/work_louder/work_board/work_board.c2
-rw-r--r--keyboards/work_louder/work_board/work_board.h1
38 files changed, 173 insertions, 525 deletions
diff --git a/keyboards/work_louder/encoder_actions.c b/keyboards/work_louder/encoder_actions.c
deleted file mode 100644
index b41a248a83..0000000000
--- a/keyboards/work_louder/encoder_actions.c
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- * Copyright 2021 drashna jael're (@drashna)
- *
- * 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 3 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 <http://www.gnu.org/licenses/>.
- */
-
-#include "encoder_actions.h"
-
-#if defined(VIA_ENABLE) && defined(ENCODER_ENABLE)
-
-# ifdef ENCODERS
-static uint8_t encoder_state[ENCODERS] = {0};
-static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY;
-static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY;
-# endif
-
-void encoder_action_unregister(void) {
-# ifdef ENCODERS
- for (int index = 0; index < ENCODERS; ++index) {
- if (encoder_state[index]) {
- keyevent_t encoder_event = (keyevent_t) {
- .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index],
- .pressed = false,
- .time = (timer_read() | 1)
- };
- encoder_state[index] = 0;
- action_exec(encoder_event);
- }
- }
-# endif
-}
-
-void encoder_action_register(uint8_t index, bool clockwise) {
-# ifdef ENCODERS
- keyevent_t encoder_event = (keyevent_t) {
- .key = clockwise ? encoder_cw[index] : encoder_ccw[index],
- .pressed = true,
- .time = (timer_read() | 1)
- };
- encoder_state[index] = (clockwise ^ 1) | (clockwise << 1);
- action_exec(encoder_event);
-# endif
-}
-
-void matrix_scan_kb(void) {
- encoder_action_unregister();
- matrix_scan_user();
-}
-
-bool encoder_update_kb(uint8_t index, bool clockwise) {
- encoder_action_register(index, clockwise);
- // don't return user actions, because they are in the keymap
- // encoder_update_user(index, clockwise);
- return true;
-};
-
-#endif
diff --git a/keyboards/work_louder/encoder_actions.h b/keyboards/work_louder/encoder_actions.h
deleted file mode 100644
index 2484af52ae..0000000000
--- a/keyboards/work_louder/encoder_actions.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* Copyright 2020 Neil Brian Ramirez
- *
- * 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 3 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 <http://www.gnu.org/licenses/>.
- */
-
-#include "quantum.h"
-
-void encoder_action_unregister(void);
-
-void encoder_action_register(uint8_t index, bool clockwise);
diff --git a/keyboards/work_louder/loop/config.h b/keyboards/work_louder/loop/config.h
index b397ec2c1d..32856ecebf 100644
--- a/keyboards/work_louder/loop/config.h
+++ b/keyboards/work_louder/loop/config.h
@@ -19,15 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0x574C
-#define PRODUCT_ID 0x1DF8
-#define DEVICE_VER 0x0001
-#define MANUFACTURER Work Louder
-#define PRODUCT Loop Pad
-
/* key matrix size */
-#define MATRIX_ROWS 2
+#define MATRIX_ROWS 1
#define MATRIX_COLS 12
/*
@@ -41,9 +34,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#define MATRIX_ROW_PINS \
- { F5, NO_PIN }
+ { F5 }
#define MATRIX_COL_PINS { B3, B2, B1, D6, D7, B4, B5, B6, C6, C7, F7, F6 }
-#define UNUSED_PINS
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
@@ -60,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define BACKLIGHT_BREATHING
#define RGBLIGHT_DI_PIN E6
-# define RGBLED_NUM 24
//# define RGBLIGHT_HUE_STEP 8
//# define RGBLIGHT_SAT_STEP 8
//# define RGBLIGHT_VAL_STEP 8
@@ -202,8 +193,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENCODERS_PAD_A { D0, D2, D5 }
#define ENCODERS_PAD_B { D1, D3, D4 }
-
-#define ENCODERS 3
-
-#define ENCODERS_CW_KEY { { 0, 1 }, { 2, 1 }, { 4, 1 } }
-#define ENCODERS_CCW_KEY { { 1, 1 }, { 3, 1 }, { 5, 1 } }
diff --git a/keyboards/work_louder/loop/info.json b/keyboards/work_louder/loop/info.json
index 2190f53512..67b9d1f06d 100644
--- a/keyboards/work_louder/loop/info.json
+++ b/keyboards/work_louder/loop/info.json
@@ -1,7 +1,12 @@
{
- "keyboard_name": "loop",
- "url": "",
+ "keyboard_name": "Loop Pad",
+ "manufacturer": "Work Louder",
+ "url": "https://worklouder.cc/",
"maintainer": "Work Louder",
+ "usb": {
+ "vid": "0x574C",
+ "pid": "0x1DF9"
+ },
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/work_louder/loop/keymaps/via/keymap.c b/keyboards/work_louder/loop/keymaps/via/keymap.c
index 286c651361..f2f8f7d9a6 100644
--- a/keyboards/work_louder/loop/keymaps/via/keymap.c
+++ b/keyboards/work_louder/loop/keymaps/via/keymap.c
@@ -15,30 +15,28 @@
*/
#include QMK_KEYBOARD_H
-#define LAYOUT_via( \
- k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
- k00_a, k00_b, k01_a, k01_b, k02_a, k02_b \
-) { \
- { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
- { k00_a, k00_b, k01_a, k01_b, k02_a, k02_b } \
-}
-
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_via(
- KC_MUTE, KC_MPLY, R_M_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1),
- KC_VOLU, KC_VOLD, KC_MNXT, KC_MPRV, R_M_MOD, R_M_RMOD
+ [0] = LAYOUT(
+ KC_MUTE, KC_MPLY, R_M_TOG, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, MO(1)
),
- [1] = LAYOUT_via(
- QK_BOOT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, MO(2), _______,
- _______, _______, _______, _______, RGB_MOD, RGB_RMOD
+ [1] = LAYOUT(
+ QK_BOOT, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, MO(2), _______
),
- [2] = LAYOUT_via(
- QK_BOOT, _______, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, _______,
- _______, _______, _______, _______, R_M_MOD, R_M_RMOD
+ [2] = LAYOUT(
+ QK_BOOT, _______, R_M_TOG, R_M_MOD, R_M_HUI, R_M_HUD, R_M_SAI, R_M_SAD, R_M_VAI, R_M_VAD, _______, _______
),
- [3] = LAYOUT_via(
- _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
- _______, _______, _______, _______, _______, _______
+ [3] = LAYOUT(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
+// clang-format on
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { ENCODER_CCW_CW(KC_VOLU, KC_VOLD), ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(R_M_RMOD, R_M_MOD) },
+ [1] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
+ [2] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______), ENCODER_CCW_CW(_______, _______) },
+};
+#endif
diff --git a/keyboards/work_louder/loop/keymaps/via/rules.mk b/keyboards/work_louder/loop/keymaps/via/rules.mk
index 6098ef3ad8..1189f4ad19 100644
--- a/keyboards/work_louder/loop/keymaps/via/rules.mk
+++ b/keyboards/work_louder/loop/keymaps/via/rules.mk
@@ -1,4 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
-
-SRC += encoder_actions.c
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/work_louder/loop/loop.c b/keyboards/work_louder/loop/loop.c
index 5c0d108d19..6b4af7fcb6 100644
--- a/keyboards/work_louder/loop/loop.c
+++ b/keyboards/work_louder/loop/loop.c
@@ -16,7 +16,7 @@
#include "loop.h"
-#if !defined(VIA_ENABLE) && defined(ENCODER_ENABLE)
+#if defined(ENCODER_ENABLE)
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (index == 0) {
diff --git a/keyboards/work_louder/loop/loop.h b/keyboards/work_louder/loop/loop.h
index cfc58146d1..a7376881b3 100644
--- a/keyboards/work_louder/loop/loop.h
+++ b/keyboards/work_louder/loop/loop.h
@@ -17,7 +17,6 @@
#pragma once
#include "quantum.h"
-#include "encoder_actions.h"
#include "rgb_functions.h"
/* This is a shortcut to help you visually see your layout.
diff --git a/keyboards/work_louder/loop/rev1/config.h b/keyboards/work_louder/loop/rev1/config.h
new file mode 100644
index 0000000000..1bc02d08a6
--- /dev/null
+++ b/keyboards/work_louder/loop/rev1/config.h
@@ -0,0 +1,6 @@
+// Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+# define RGBLED_NUM 24
diff --git a/keyboards/work_louder/loop/rev1/info.json b/keyboards/work_louder/loop/rev1/info.json
new file mode 100644
index 0000000000..90ac25f360
--- /dev/null
+++ b/keyboards/work_louder/loop/rev1/info.json
@@ -0,0 +1,5 @@
+{
+ "usb": {
+ "device_version": "0.0.1"
+ }
+}
diff --git a/keyboards/work_louder/loop/rev1/rules.mk b/keyboards/work_louder/loop/rev1/rules.mk
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/keyboards/work_louder/loop/rev1/rules.mk
diff --git a/keyboards/work_louder/loop/rev3/config.h b/keyboards/work_louder/loop/rev3/config.h
new file mode 100644
index 0000000000..5451d4466e
--- /dev/null
+++ b/keyboards/work_louder/loop/rev3/config.h
@@ -0,0 +1,6 @@
+// Copyright 2021 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#define RGBLED_NUM 11
diff --git a/keyboards/work_louder/loop/rev3/info.json b/keyboards/work_louder/loop/rev3/info.json
new file mode 100644
index 0000000000..b377cdff00
--- /dev/null
+++ b/keyboards/work_louder/loop/rev3/info.json
@@ -0,0 +1,5 @@
+{
+ "usb": {
+ "device_version": "0.0.3"
+ }
+}
diff --git a/keyboards/work_louder/loop/rev3/rules.mk b/keyboards/work_louder/loop/rev3/rules.mk
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/keyboards/work_louder/loop/rev3/rules.mk
diff --git a/keyboards/work_louder/loop/rules.mk b/keyboards/work_louder/loop/rules.mk
index 6414533ce0..ac0a513785 100644
--- a/keyboards/work_louder/loop/rules.mk
+++ b/keyboards/work_louder/loop/rules.mk
@@ -24,3 +24,5 @@ RGB_MATRIX_DRIVER = WS2812
LTO_ENABLE = yes
SRC += rgb_functions.c
+
+DEFAULT_FOLDER = work_louder/loop/rev3
diff --git a/keyboards/work_louder/micro/info.json b/keyboards/work_louder/micro/info.json
index 62baf15351..3905f226f8 100644
--- a/keyboards/work_louder/micro/info.json
+++ b/keyboards/work_louder/micro/info.json
@@ -1,6 +1,6 @@
{
+ "keyboard_name": "Micro Pad",
"manufacturer": "Work Louder",
- "keyboard_name": "micro",
"bootloader": "atmel-dfu",
"diode_direction": "COL2ROW",
"features": {
@@ -30,7 +30,7 @@
"max_brightness": 255,
"saturation_steps": 8
},
- "url": "",
+ "url": "https://worklouder.cc/",
"usb": {
"device_version": "1.0.0",
"pid": "0xE6E3",
diff --git a/keyboards/work_louder/micro/micro.c b/keyboards/work_louder/micro/micro.c
index aae8048c59..80d3927417 100644
--- a/keyboards/work_louder/micro/micro.c
+++ b/keyboards/work_louder/micro/micro.c
@@ -26,7 +26,7 @@ led_config_t g_led_config = { {
// clang-format on
#endif
-#if defined(ENCODER_ENABLE) && !defined(ENCODERS) && !defined(ENCODER_MAP_ENABLE)
+#if defined(ENCODER_ENABLE)
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) {
return false;
diff --git a/keyboards/work_louder/nano/config.h b/keyboards/work_louder/nano/config.h
index 4e03f0a897..7a7d03b8a3 100644
--- a/keyboards/work_louder/nano/config.h
+++ b/keyboards/work_louder/nano/config.h
@@ -19,16 +19,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0x574C
-#define PRODUCT_ID 0xE6EF
-#define DEVICE_VER 0x0001
-#define MANUFACTURER Work Louder
-#define PRODUCT Nano Pad
-
/* key matrix size */
#define MATRIX_ROWS 1
-#define MATRIX_COLS 5
+#define MATRIX_COLS 3
/*
* Keyboard Matrix Assignments
@@ -43,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS \
{ F7 }
#define MATRIX_COL_PINS \
- { B5, B6, C6, NO_PIN, NO_PIN }
+ { B5, B6, C6 }
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW
@@ -202,14 +195,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ D7 }
#define ENCODERS_PAD_B \
{ B4 }
-
-#define ENCODERS 1
-
-#define ENCODERS_CW_KEY \
- { \
- { 3, 0 } \
- }
-#define ENCODERS_CCW_KEY \
- { \
- { 4, 0 } \
- }
diff --git a/keyboards/work_louder/nano/info.json b/keyboards/work_louder/nano/info.json
index a80ef21d63..46b083d0ef 100644
--- a/keyboards/work_louder/nano/info.json
+++ b/keyboards/work_louder/nano/info.json
@@ -1,7 +1,13 @@
{
- "keyboard_name": "nano",
- "url": "",
+ "keyboard_name": "Nano Pad",
+ "manufacturer": "Work Louder",
+ "url": "https://worklouder.cc/",
"maintainer": "Work Louder",
+ "usb": {
+ "vid": "0x574C",
+ "pid": "0xE6F0",
+ "device_version": "0.0.1"
+ },
"layouts": {
"LAYOUT": {
"layout": [
diff --git a/keyboards/work_louder/nano/keymaps/via/keymap.c b/keyboards/work_louder/nano/keymaps/via/keymap.c
index 07451f52b2..84c5895d5e 100644
--- a/keyboards/work_louder/nano/keymaps/via/keymap.c
+++ b/keyboards/work_louder/nano/keymaps/via/keymap.c
@@ -15,31 +15,28 @@
*/
#include QMK_KEYBOARD_H
-
-#define LAYOUT_via( \
- k00, k01, k02, \
- k00_a, k00_b \
-) { \
- { k00, k01, k02, k00_a, k00_b } \
-}
-
-
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
- [0] = LAYOUT_via(
- KC_PSCR, MACRO00, MO(1),
- KC_PGDN, KC_PGUP
+ [0] = LAYOUT(
+ TG(1), C(KC_C), C(KC_V)
),
- [1] = LAYOUT_via(
- QK_BOOT, MACRO01, _______,
- _______, _______
+ [1] = LAYOUT(
+ TG(1) , G(KC_C), G(KC_V)
),
- [2] = LAYOUT_via(
- _______, _______, _______,
- _______, _______
+ [2] = LAYOUT(
+ _______, _______, _______
),
- [3] = LAYOUT_via(
- _______, _______, _______,
- _______, _______
+ [3] = LAYOUT(
+ _______, _______, _______
)
};
+
+
+#ifdef ENCODER_MAP_ENABLE
+const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = {
+ [0] = { ENCODER_CCW_CW(C(KC_Z), C(KC_Y)) },
+ [1] = { ENCODER_CCW_CW(G(KC_Z), G(S(KC_Z))) },
+ [2] = { ENCODER_CCW_CW(_______, _______) },
+ [3] = { ENCODER_CCW_CW(_______, _______) }
+};
+#endif
diff --git a/keyboards/work_louder/nano/keymaps/via/rules.mk b/keyboards/work_louder/nano/keymaps/via/rules.mk
index 6098ef3ad8..1189f4ad19 100644
--- a/keyboards/work_louder/nano/keymaps/via/rules.mk
+++ b/keyboards/work_louder/nano/keymaps/via/rules.mk
@@ -1,4 +1,3 @@
VIA_ENABLE = yes
LTO_ENABLE = yes
-
-SRC += encoder_actions.c
+ENCODER_MAP_ENABLE = yes
diff --git a/keyboards/work_louder/nano/nano.c b/keyboards/work_louder/nano/nano.c
index 62d44ef133..96b633aa79 100644
--- a/keyboards/work_louder/nano/nano.c
+++ b/keyboards/work_louder/nano/nano.c
@@ -16,7 +16,7 @@
#include "nano.h"
-#if !defined(VIA_ENABLE) && defined(ENCODER_ENABLE)
+#if defined(ENCODER_ENABLE)
bool encoder_update_kb(uint8_t index, bool clockwise) {
if (!encoder_update_user(index, clockwise)) { return false; }
if (clockwise) {
diff --git a/keyboards/work_louder/nano/nano.h b/keyboards/work_louder/nano/nano.h
index 6230d75ab7..cc152b8ccc 100644
--- a/keyboards/work_louder/nano/nano.h
+++ b/keyboards/work_louder/nano/nano.h
@@ -17,7 +17,6 @@
#pragma once
#include "quantum.h"
-#include "encoder_actions.h"
#include "rgb_functions.h"
/* This is a shortcut to help you visually see your layout.
diff --git a/keyboards/work_louder/rgb_functions.c b/keyboards/work_louder/rgb_functions.c
index c9106b3976..d0cb93ccbc 100644
--- a/keyboards/work_louder/rgb_functions.c
+++ b/keyboards/work_louder/rgb_functions.c
@@ -18,159 +18,15 @@
#include "rgb_functions.h"
#ifdef RGBLIGHT_ENABLE
-# include "ws2812.h"
-# include <avr/interrupt.h>
-# include <avr/io.h>
-# include <util/delay.h>
+#undef RGB_DI_PIN
+#define RGB_DI_PIN RGBLIGHT_DI_PIN
-# define pinmask(pin) (_BV((pin)&0xF))
+#define ws2812_setleds ws2812_rgb_setleds
-/*
- * Forward declare internal functions
- *
- * The functions take a byte-array and send to the data output as WS2812 bitstream.
- * The length is the number of bytes to send - three per LED.
- */
-
-static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi);
-
-/*
- This routine writes an array of bytes with RGB values to the Dataout pin
- using the fast 800kHz clockless WS2811/2812 protocol.
-*/
-
-// Timing in ns
-# define w_zeropulse 350
-# define w_onepulse 900
-# define w_totalperiod 1250
-
-// Fixed cycles used by the inner loop
-# define w_fixedlow 2
-# define w_fixedhigh 4
-# define w_fixedtotal 8
-
-// Insert NOPs to match the timing, if possible
-# define w_zerocycles (((F_CPU / 1000) * w_zeropulse) / 1000000)
-# define w_onecycles (((F_CPU / 1000) * w_onepulse + 500000) / 1000000)
-# define w_totalcycles (((F_CPU / 1000) * w_totalperiod + 500000) / 1000000)
-
-// w1_nops - nops between rising edge and falling edge - low
-# if w_zerocycles >= w_fixedlow
-# define w1_nops (w_zerocycles - w_fixedlow)
-# else
-# define w1_nops 0
-# endif
-
-// w2_nops - nops between fe low and fe high
-# if w_onecycles >= (w_fixedhigh + w1_nops)
-# define w2_nops (w_onecycles - w_fixedhigh - w1_nops)
-# else
-# define w2_nops 0
-# endif
-
-// w3_nops - nops to complete loop
-# if w_totalcycles >= (w_fixedtotal + w1_nops + w2_nops)
-# define w3_nops (w_totalcycles - w_fixedtotal - w1_nops - w2_nops)
-# else
-# define w3_nops 0
-# endif
-
-// The only critical timing parameter is the minimum pulse length of the "0"
-// Warn or throw error if this timing can not be met with current F_CPU settings.
-# define w_lowtime ((w1_nops + w_fixedlow) * 1000000) / (F_CPU / 1000)
-# if w_lowtime > 550
-# error "Light_ws2812: Sorry, the clock speed is too low. Did you set F_CPU correctly?"
-# elif w_lowtime > 450
-# warning "Light_ws2812: The timing is critical and may only work on WS2812B, not on WS2812(S)."
-# warning "Please consider a higher clockspeed, if possible"
-# endif
-
-# define w_nop1 "nop \n\t"
-# define w_nop2 "rjmp .+0 \n\t"
-# define w_nop4 w_nop2 w_nop2
-# define w_nop8 w_nop4 w_nop4
-# define w_nop16 w_nop8 w_nop8
-
-static inline void ws2812_sendarray_mask(uint8_t *data, uint16_t datlen, uint8_t masklo, uint8_t maskhi) {
- uint8_t curbyte, ctr, sreg_prev;
-
- sreg_prev = SREG;
- cli();
-
- while (datlen--) {
- curbyte = (*data++);
-
- asm volatile(" ldi %0,8 \n\t"
- "loop%=: \n\t"
- " out %2,%3 \n\t" // '1' [01] '0' [01] - re
-# if (w1_nops & 1)
- w_nop1
-# endif
-# if (w1_nops & 2)
- w_nop2
-# endif
-# if (w1_nops & 4)
- w_nop4
-# endif
-# if (w1_nops & 8)
- w_nop8
-# endif
-# if (w1_nops & 16)
- w_nop16
-# endif
- " sbrs %1,7 \n\t" // '1' [03] '0' [02]
- " out %2,%4 \n\t" // '1' [--] '0' [03] - fe-low
- " lsl %1 \n\t" // '1' [04] '0' [04]
-# if (w2_nops & 1)
- w_nop1
-# endif
-# if (w2_nops & 2)
- w_nop2
-# endif
-# if (w2_nops & 4)
- w_nop4
-# endif
-# if (w2_nops & 8)
- w_nop8
-# endif
-# if (w2_nops & 16)
- w_nop16
-# endif
- " out %2,%4 \n\t" // '1' [+1] '0' [+1] - fe-high
-# if (w3_nops & 1)
- w_nop1
-# endif
-# if (w3_nops & 2)
- w_nop2
-# endif
-# if (w3_nops & 4)
- w_nop4
-# endif
-# if (w3_nops & 8)
- w_nop8
-# endif
-# if (w3_nops & 16)
- w_nop16
-# endif
-
- " dec %0 \n\t" // '1' [+2] '0' [+2]
- " brne loop%=\n\t" // '1' [+3] '0' [+4]
- : "=&d"(ctr)
- : "r"(curbyte), "I"(_SFR_IO_ADDR(PORTx_ADDRESS(RGBLIGHT_DI_PIN))), "r"(maskhi), "r"(masklo));
- }
-
- SREG = sreg_prev;
-}
+#include "ws2812.c"
void rgblight_call_driver(LED_TYPE *start_led, uint8_t num_leds) {
- DDRx_ADDRESS(RGBLIGHT_DI_PIN) |= pinmask(RGBLIGHT_DI_PIN);
-
- uint8_t masklo = ~(pinmask(RGBLIGHT_DI_PIN)) & PORTx_ADDRESS(RGBLIGHT_DI_PIN);
- uint8_t maskhi = pinmask(RGBLIGHT_DI_PIN) | PORTx_ADDRESS(RGBLIGHT_DI_PIN);
-
- ws2812_sendarray_mask((uint8_t *)start_led, num_leds * sizeof(LED_TYPE), masklo, maskhi);
-
- _delay_us(WS2812_TRST_US);
+ ws2812_setleds(start_led, num_leds);
}
#endif
diff --git a/keyboards/work_louder/work_board/config.h b/keyboards/work_louder/work_board/config.h
index 106184b7de..512c282794 100644
--- a/keyboards/work_louder/work_board/config.h
+++ b/keyboards/work_louder/work_board/config.h
@@ -19,13 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
-/* USB Device descriptor parameter */
-#define VENDOR_ID 0x574C
-#define PRODUCT_ID 0xDCD0
-#define DEVICE_VER 0x0001
-#define MANUFACTURER Work Louder
-#define PRODUCT Work Board
-
/* key matrix size */
#define MATRIX_ROWS 4
#define MATRIX_COLS 13
@@ -44,13 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ F0, F1, F4, F5 }
#define MATRIX_COL_PINS \
{ D3, D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, E6 }
-#define UNUSED_PINS
/* COL2ROW, ROW2COL */
#define DIODE_DIRECTION COL2ROW