diff options
author | lokher <lokher@gmail.com> | 2022-09-13 11:13:00 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2022-09-13 11:13:00 +0800 |
commit | fe13cedf8c09fa34d5cec4e4c624738095176625 (patch) | |
tree | 818436626d49c7f22f325632b2053edba10d4358 /keyboards/work_louder/nano | |
parent | fa207545a9759c50b9f230eb608d86a9085801d4 (diff) | |
parent | f46379f308783994b8178f95adc686f4b4c3ebd8 (diff) |
merge upstream master
Diffstat (limited to 'keyboards/work_louder/nano')
-rw-r--r-- | keyboards/work_louder/nano/config.h | 22 | ||||
-rw-r--r-- | keyboards/work_louder/nano/info.json | 10 | ||||
-rw-r--r-- | keyboards/work_louder/nano/keymaps/via/keymap.c | 39 | ||||
-rw-r--r-- | keyboards/work_louder/nano/keymaps/via/rules.mk | 3 | ||||
-rw-r--r-- | keyboards/work_louder/nano/nano.c | 2 | ||||
-rw-r--r-- | keyboards/work_louder/nano/nano.h | 1 |
6 files changed, 30 insertions, 47 deletions
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. |