From 65227adf50dfd3f3cfd759042192e3a23049d877 Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Wed, 3 Aug 2022 22:03:40 +0200 Subject: [PATCH] it compiles! --- keyboards/t9/config.h | 22 ++-------- keyboards/t9/keymaps/default/keymap.c | 2 +- keyboards/t9/keymaps/numpad/keymap.c | 63 --------------------------- keyboards/t9/rules.mk | 18 +++++++- keyboards/t9/t9.c | 19 ++++++++ 5 files changed, 41 insertions(+), 83 deletions(-) delete mode 100644 keyboards/t9/keymaps/numpad/keymap.c create mode 100644 keyboards/t9/t9.c diff --git a/keyboards/t9/config.h b/keyboards/t9/config.h index 98809485e8..8767440992 100644 --- a/keyboards/t9/config.h +++ b/keyboards/t9/config.h @@ -45,6 +45,8 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE +#define LAYER_STATE_8BIT + /* * Feature disable options * These options are also useful to firmware size reduction. @@ -59,7 +61,8 @@ /* disable action features */ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT +#define NO_ACTION_ONESHOT +#define NO_MUSIC_MODE /* @@ -78,23 +81,6 @@ * └───────┴───┴───┘ */ -led_config_t g_led_config = { { - // Key Matrix to LED Index - { 21, 20, 19, 18, }, - { 17, 16, 15, 14, }, - { 13, 12, 11, NO_LED }, - { 10, 9, 8, 7 }, - { 6, 5, 4, NO_LED }, - { 3, NO_LED, 1, 0 } -}, { - // LED Index to Physical Position - // x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION - // y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION - { 224, 58 }, { 149, 64 }, { 112, 64 }, { 149, 51 }, { 75, 51 }, { 0, 51 }, { 224, 32 }, { 149, 38 }, { 75, 38 }, { 0, 38 }, { 149, 26 }, { 75, 26 }, { 0, 26 }, { 224, 13 }, { 149, 13 }, { 75, 13 }, { 0, 13 }, { 224, 0 }, { 149, 0 }, { 75, 0 }, { 0, 0 } -}, { - // LED Index to Flag - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 -} }; #define ENABLE_RGB_MATRIX_ALPHAS_MODS #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN diff --git a/keyboards/t9/keymaps/default/keymap.c b/keyboards/t9/keymaps/default/keymap.c index f81fe3a9bf..b65d34f7d5 100644 --- a/keyboards/t9/keymaps/default/keymap.c +++ b/keyboards/t9/keymaps/default/keymap.c @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [0] = LAYOUT_numpad_6x4( KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, - TD(TD_ESC_CAPS), KC_PSLS, KC_PAST, KC_PMNS, + TD(TD_NUM_RGB), KC_PSLS, KC_PAST, KC_PMNS, KC_P7, KC_P8, KC_P9, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_P1, KC_P2, KC_P3, diff --git a/keyboards/t9/keymaps/numpad/keymap.c b/keyboards/t9/keymaps/numpad/keymap.c deleted file mode 100644 index 47be1ffe90..0000000000 --- a/keyboards/t9/keymaps/numpad/keymap.c +++ /dev/null @@ -1,63 +0,0 @@ -#include QMK_KEYBOARD_H - -// Tap Dance declarations -enum { - TD_NUM_RGB, -}; - -// Tap Dance definitions -qk_tap_dance_action_t tap_dance_actions[] = { - // Tap once for NumLock, twice for RGB layer - [TD_NUM_RGB] = ACTION_TAP_DANCE_LAYER_TOGGLE(KC_NUM, 1), -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* - * ┌───┬───┬───┬───┐ - * │ ⏮ │ ⏯ │ ■ │ ⏭ │ - * ├───┼───┼───┼───┤ - * │Num│ / │ * │ - │ - * ├───┼───┼───┼───┤ - * │ 7 │ 8 │ 9 │ │ - * ├───┼───┼───┤ + │ - * │ 4 │ 5 │ 6 │ │ - * ├───┼───┼───┼───┤ - * │ 1 │ 2 │ 3 │ │ - * ├───┴───┼───┤Ent│ - * │ 0 │ . │ │ - * └───────┴───┴───┘ - */ - [0] = LAYOUT_numpad( - KC_MPRV, KC_MPLY, KC_MSTP, KC_MNXT, - TD(TD_ESC_CAPS), KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT - ), - - /* - * ┌─────┬─────┬─────┬─────┐ - * │ModeR│Breat│Plain│Mode │ - * ├─────┼─────┼─────┼─────┤ - * │ │Rainb│Swirl│Sped-│ - * ├─────┼─────┼─────┼─────┤ - * │Brig+│Brig-│ │ │ - * ├─────┼─────┼─────┤Sped+│ - * │Satu+│Satu-│ │ │ - * ├─────┼─────┼─────┼─────┤ - * │Hue+ │Hue- │ │ │ - * ├─────┴─────┼─────┤OnOff│ - * │ │ │ │ - * └───────────┴─────┴─────┘ - */ - [1] = LAYOUT_numpad( - RGB_RMOD, RGB_M_B, RGB_M_P, RGB_MOD, - _______, RGB_M_R, RGB_M_SW, RGB_SPD, - RGB_VAI, RGB_VAD, _______, - RGB_SAI, RGB_SAD, _______, RGB_SPI, - RGB_HUI, RGB_HUD, _______, - _______, _______, RGB_TOG, - ) -}; - diff --git a/keyboards/t9/rules.mk b/keyboards/t9/rules.mk index c7c0b6ed00..7bffb6a409 100644 --- a/keyboards/t9/rules.mk +++ b/keyboards/t9/rules.mk @@ -5,10 +5,26 @@ F_USB = $(F_CPU) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT BOOTLOADER = atmel-dfu +# Build Options +# change yes to no to disable +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output +LTO_ENABLE = yes +SPACE_CADET_ENABLE = no +GRAVE_ESC_ENABLE = no +MAGIC_ENABLE = no +MUSIC_ENABLE = no + RGB_MATRIX_ENABLE = yes RGB_MATRIX_DRIVER = WS2812 # also supports SK6812MINI TAP_DANCE_ENABLE = yes -EXTRAKEY_ENABLE = yes # Audio control and System control WS2812_DRIVER = bitbang diff --git a/keyboards/t9/t9.c b/keyboards/t9/t9.c new file mode 100644 index 0000000000..d8f0b2305d --- /dev/null +++ b/keyboards/t9/t9.c @@ -0,0 +1,19 @@ +#include "quantum.h" + +led_config_t g_led_config = { { + // Key Matrix to LED Index + { 21, 20, 19, 18, }, + { 17, 16, 15, 14, }, + { 13, 12, 11, NO_LED }, + { 10, 9, 8, 7 }, + { 6, 5, 4, NO_LED }, + { 3, NO_LED, 1, 0 } +}, { + // LED Index to Physical Position + // x = 224 / (NUMBER_OF_COLS - 1) * COL_POSITION + // y = 64 / (NUMBER_OF_ROWS - 1) * ROW_POSITION + { 224, 58 }, { 149, 64 }, { 112, 64 }, { 149, 51 }, { 75, 51 }, { 0, 51 }, { 224, 32 }, { 149, 38 }, { 75, 38 }, { 0, 38 }, { 149, 26 }, { 75, 26 }, { 0, 26 }, { 224, 13 }, { 149, 13 }, { 75, 13 }, { 0, 13 }, { 224, 0 }, { 149, 0 }, { 75, 0 }, { 0, 0 } +}, { + // LED Index to Flag + 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 +} };