diff options
Diffstat (limited to 'keyboards/nullbitsco/tidbit')
-rw-r--r-- | keyboards/nullbitsco/tidbit/config.h | 8 | ||||
-rw-r--r-- | keyboards/nullbitsco/tidbit/info.json | 8 | ||||
-rw-r--r-- | keyboards/nullbitsco/tidbit/tidbit.c | 10 |
3 files changed, 11 insertions, 15 deletions
diff --git a/keyboards/nullbitsco/tidbit/config.h b/keyboards/nullbitsco/tidbit/config.h index 23b2f5f1a4..346a8fb8a8 100644 --- a/keyboards/nullbitsco/tidbit/config.h +++ b/keyboards/nullbitsco/tidbit/config.h @@ -22,15 +22,7 @@ // Workaround for freezing after MacOS sleep #define USB_SUSPEND_WAKEUP_DELAY 200 -/* key matrix pins */ -#define MATRIX_ROW_PINS { B1, E6, D7, C6, D4 } -#define MATRIX_COL_PINS { NO_PIN, NO_PIN, F4, F5, F6, F7 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - /* Optional SMT LED pins */ -#define RGB_DI_PIN B6 #define RGBLED_NUM 8 #define RGBLIGHT_EFFECT_BREATHING #define RGBLIGHT_EFFECT_RAINBOW_MOOD diff --git a/keyboards/nullbitsco/tidbit/info.json b/keyboards/nullbitsco/tidbit/info.json index cce2a2902c..e2e060aef0 100644 --- a/keyboards/nullbitsco/tidbit/info.json +++ b/keyboards/nullbitsco/tidbit/info.json @@ -7,6 +7,14 @@ "pid": "0x6064", "device_version": "0.0.1" }, + "ws2812": { + "pin": "B6" + }, + "matrix_pins": { + "cols": [null, null, "F4", "F5", "F6", "F7"], + "rows": ["B1", "E6", "D7", "C6", "D4"] + }, + "diode_direction": "ROW2COL", "encoder": { "rotary": [ {"pin_a": "B2", "pin_b": "B3"}, diff --git a/keyboards/nullbitsco/tidbit/tidbit.c b/keyboards/nullbitsco/tidbit/tidbit.c index fdfffaa933..d07ba12651 100644 --- a/keyboards/nullbitsco/tidbit/tidbit.c +++ b/keyboards/nullbitsco/tidbit/tidbit.c @@ -14,7 +14,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#include QMK_KEYBOARD_H +#include "tidbit.h" typedef struct PACKED { uint8_t r; @@ -85,15 +85,11 @@ bool oled_task_kb(void) { #endif static void process_encoder_matrix(encodermap_t pos) { - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = true, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, true)); #if TAP_CODE_DELAY > 0 wait_ms(TAP_CODE_DELAY); #endif - action_exec((keyevent_t){ - .key = (keypos_t){.row = pos.r, .col = pos.c}, .pressed = false, .time = (timer_read() | 1) /* time should not be 0 */ - }); + action_exec(MAKE_KEYEVENT(pos.r, pos.c, false)); } bool encoder_update_kb(uint8_t index, bool clockwise) { |