From 6cb0e8924ba258e112174b1dac36c88d16fbc560 Mon Sep 17 00:00:00 2001 From: peepeetee <43021794+peepeetee@users.noreply.github.com> Date: Tue, 1 Feb 2022 03:46:08 +0800 Subject: [Keyboard] move @yynmt 's boards into /yynmt (#16075) --- keyboards/yynmt/dozen0/config.h | 122 +++++++++++++++++++++++ keyboards/yynmt/dozen0/dozen0.c | 16 +++ keyboards/yynmt/dozen0/dozen0.h | 34 +++++++ keyboards/yynmt/dozen0/info.json | 13 +++ keyboards/yynmt/dozen0/keymaps/default/keymap.c | 122 +++++++++++++++++++++++ keyboards/yynmt/dozen0/keymaps/default/readme.md | 45 +++++++++ keyboards/yynmt/dozen0/keymaps/f12/keymap.c | 40 ++++++++ keyboards/yynmt/dozen0/keymaps/via/keymap.c | 48 +++++++++ keyboards/yynmt/dozen0/keymaps/via/rules.mk | 1 + keyboards/yynmt/dozen0/readme.md | 15 +++ keyboards/yynmt/dozen0/rules.mk | 18 ++++ 11 files changed, 474 insertions(+) create mode 100644 keyboards/yynmt/dozen0/config.h create mode 100644 keyboards/yynmt/dozen0/dozen0.c create mode 100644 keyboards/yynmt/dozen0/dozen0.h create mode 100644 keyboards/yynmt/dozen0/info.json create mode 100644 keyboards/yynmt/dozen0/keymaps/default/keymap.c create mode 100644 keyboards/yynmt/dozen0/keymaps/default/readme.md create mode 100644 keyboards/yynmt/dozen0/keymaps/f12/keymap.c create mode 100644 keyboards/yynmt/dozen0/keymaps/via/keymap.c create mode 100644 keyboards/yynmt/dozen0/keymaps/via/rules.mk create mode 100644 keyboards/yynmt/dozen0/readme.md create mode 100644 keyboards/yynmt/dozen0/rules.mk (limited to 'keyboards/yynmt/dozen0') diff --git a/keyboards/yynmt/dozen0/config.h b/keyboards/yynmt/dozen0/config.h new file mode 100644 index 0000000000..48d847bde1 --- /dev/null +++ b/keyboards/yynmt/dozen0/config.h @@ -0,0 +1,122 @@ +/* +Copyright 2019 yynmt + +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 2 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 . +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEA4F +#define DEVICE_VER 0x0001 +#define MANUFACTURER yynmt +#define PRODUCT Dozen0 + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F4 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6, B5, B4, E6, D7, C6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/yynmt/dozen0/dozen0.c b/keyboards/yynmt/dozen0/dozen0.c new file mode 100644 index 0000000000..42872a2105 --- /dev/null +++ b/keyboards/yynmt/dozen0/dozen0.c @@ -0,0 +1,16 @@ +/* Copyright 2019 yynmt + * + * 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 2 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 . + */ +#include "dozen0.h" diff --git a/keyboards/yynmt/dozen0/dozen0.h b/keyboards/yynmt/dozen0/dozen0.h new file mode 100644 index 0000000000..e2ab35bcef --- /dev/null +++ b/keyboards/yynmt/dozen0/dozen0.h @@ -0,0 +1,34 @@ +/* Copyright 2019 yynmt + * + * 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 2 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, \ + K06, K07, K08, K09, K10, K11 \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11 }, \ +} diff --git a/keyboards/yynmt/dozen0/info.json b/keyboards/yynmt/dozen0/info.json new file mode 100644 index 0000000000..38e0f38751 --- /dev/null +++ b/keyboards/yynmt/dozen0/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Dozen0", + "url": "http://yynmt.com", + "maintainer": "yynmt", + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1} + ] + } + } +} diff --git a/keyboards/yynmt/dozen0/keymaps/default/keymap.c b/keyboards/yynmt/dozen0/keymaps/default/keymap.c new file mode 100644 index 0000000000..a869c6e93c --- /dev/null +++ b/keyboards/yynmt/dozen0/keymaps/default/keymap.c @@ -0,0 +1,122 @@ +/* Copyright 2019 yynmt + * + * 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 2 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 . + */ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +enum layer_number { + _BASE = 0, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + BASE = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + RGBRST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base + * ,-----------------------------------------. + * | Cut | Copy |Paste | Up |Delete| Bksp | + * | | | | | |Raise | + * |------+------+------+------+------+------| + * | Ctrl |Shift | Left | Down |Right |Enter | + * | | | | | |Lower | + * `-----------------------------------------' + */ + [_BASE] = LAYOUT( + LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_UP, KC_DEL, LT(_RAISE,KC_BSPC), + KC_LCTL, KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, LT(_LOWER,KC_ENT) + ), + + /* Lower + * ,-----------------------------------------. + * | | | | Page | | | + * | | | | Up | | | + * |------+------+------+------+------+------| + * | | | Home | Page | End | | + * | | | | Down | | | + * `-----------------------------------------' + */ + [_LOWER] = LAYOUT( + _______, _______, _______, KC_PGUP, _______, _______, + _______, _______, KC_HOME, KC_PGDN, KC_END, _______ + ), + + /* Raise + * ,-----------------------------------------. + * | | | | | | | + * | | | | | | | + * |------+------+------+------+------+------| + * | | | | | | | + * | | | | | | | + * `-----------------------------------------' + */ + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + /* Adjust + * ,-----------------------------------------. + * | RGB | RGB | RGB | RGB | RGB | | + * |Toggle|Mode+ | Hue+ | Sat+ | Val+ | | + * |------+------+------+------+------+------| + * | RGB | RGB | RGB | RGB | RGB | | + * |Reset |Mode- | Hue- | Sat- | Val- | | + * `-----------------------------------------' + */ + [_ADJUST] = LAYOUT( + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, + RGBRST, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______ + ) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +int RGB_current_mode; + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} diff --git a/keyboards/yynmt/dozen0/keymaps/default/readme.md b/keyboards/yynmt/dozen0/keymaps/default/readme.md new file mode 100644 index 0000000000..832c720751 --- /dev/null +++ b/keyboards/yynmt/dozen0/keymaps/default/readme.md @@ -0,0 +1,45 @@ +# The default keymap for Dozen0 + +## Base +``` +,-----------------------------------------. +| Cut | Copy |Paste | Up |Delete| Bksp | +| | | | | |Raise | +|------+------+------+------+------+------| +| Ctrl |Shift | Left | Down |Right |Enter | +| | | | | |Lower | +`-----------------------------------------' +``` + +## Lower +``` +,-----------------------------------------. +| | | | Page | | | +| | | | Up | | | +|------+------+------+------+------+------| +| | | Home | Page | End | | +| | | | Down | | | +`-----------------------------------------' +``` + +## Raise +``` +,-----------------------------------------. +| | | | | | | +| | | | | | | +|------+------+------+------+------+------| +| | | | | | | +| | | | | | | +`-----------------------------------------' +``` + +## Adjust +``` +,-----------------------------------------. +| RGB | RGB | RGB | RGB | RGB | | +|Toggle|Mode+ | Hue+ | Sat+ | Val+ | | +|------+------+------+------+------+------| +| RGB | RGB | RGB | RGB | RGB | | +|Reset |Mode- | Hue- | Sat- | Val- | | +`-----------------------------------------' +``` diff --git a/keyboards/yynmt/dozen0/keymaps/f12/keymap.c b/keyboards/yynmt/dozen0/keymaps/f12/keymap.c new file mode 100644 index 0000000000..167e29e106 --- /dev/null +++ b/keyboards/yynmt/dozen0/keymaps/f12/keymap.c @@ -0,0 +1,40 @@ +/* Copyright 2019 yynmt + * + * 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 2 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/yynmt/dozen0/keymaps/via/keymap.c b/keyboards/yynmt/dozen0/keymaps/via/keymap.c new file mode 100644 index 0000000000..91f15469ff --- /dev/null +++ b/keyboards/yynmt/dozen0/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2021 yynmt + * + * 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 2 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base + * ,-----------------------------------------. + * | Cut | Copy |Paste | Up |Delete| Bksp | + * | | | | | |Raise | + * |------+------+------+------+------+------| + * | Ctrl |Shift | Left | Down |Right |Enter | + * | | | | | |Lower | + * `-----------------------------------------' + */ + [0] = LAYOUT( + LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_UP, KC_DEL, LT(2,KC_BSPC), + KC_LCTL, KC_LSFT, KC_LEFT, KC_DOWN, KC_RGHT, LT(1,KC_ENT) + ), + /* Lower */ + [1] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + /* Raise */ + [2] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + /* Adjust */ + [3] = LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), +}; diff --git a/keyboards/yynmt/dozen0/keymaps/via/rules.mk b/keyboards/yynmt/dozen0/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/yynmt/dozen0/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/yynmt/dozen0/readme.md b/keyboards/yynmt/dozen0/readme.md new file mode 100644 index 0000000000..c215e96e4c --- /dev/null +++ b/keyboards/yynmt/dozen0/readme.md @@ -0,0 +1,15 @@ +# Dozen0 + +![Dozen0](https://raw.githubusercontent.com/yynmt/Dozen0/master/images/main_image_mx.jpg) + +Dozen0 is 12 keys macropad. + +Keyboard Maintainer: [yynmt](https://github.com/yynmt) +Hardware Supported: Dozen0 PCBs, ProMicro supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make yynmt/dozen0:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/yynmt/dozen0/rules.mk b/keyboards/yynmt/dozen0/rules.mk new file mode 100644 index 0000000000..7d2cea91df --- /dev/null +++ b/keyboards/yynmt/dozen0/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # 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 = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output -- cgit v1.2.3