diff options
Diffstat (limited to 'keyboards/kakunpc')
132 files changed, 6465 insertions, 0 deletions
diff --git a/keyboards/kakunpc/angel17/.noci b/keyboards/kakunpc/angel17/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/angel17/.noci diff --git a/keyboards/kakunpc/angel17/alpha/.noci b/keyboards/kakunpc/angel17/alpha/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/angel17/alpha/.noci diff --git a/keyboards/kakunpc/angel17/alpha/alpha.c b/keyboards/kakunpc/angel17/alpha/alpha.c new file mode 100644 index 0000000000..1c2936e157 --- /dev/null +++ b/keyboards/kakunpc/angel17/alpha/alpha.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "alpha.h" diff --git a/keyboards/kakunpc/angel17/alpha/alpha.h b/keyboards/kakunpc/angel17/alpha/alpha.h new file mode 100644 index 0000000000..5b8600a206 --- /dev/null +++ b/keyboards/kakunpc/angel17/alpha/alpha.h @@ -0,0 +1,40 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k41, k33 \ +) \ +{ \ + { k00, k10, k20, k31, k41 }, \ + { k02, k12, k22, k33, KC_NO }, \ + { k01, k11, k21, k32, KC_NO }, \ + { k03, k13, k30, k40, KC_NO }, \ +} diff --git a/keyboards/kakunpc/angel17/alpha/config.h b/keyboards/kakunpc/angel17/alpha/config.h new file mode 100644 index 0000000000..35e9c132b8 --- /dev/null +++ b/keyboards/kakunpc/angel17/alpha/config.h @@ -0,0 +1,144 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel17 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 5 + +/* + * 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 { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #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 + +/* 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/kakunpc/angel17/alpha/rules.mk b/keyboards/kakunpc/angel17/alpha/rules.mk new file mode 100644 index 0000000000..4ee22403e9 --- /dev/null +++ b/keyboards/kakunpc/angel17/alpha/rules.mk @@ -0,0 +1,20 @@ +# 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 = yes # Console for debug +COMMAND_ENABLE = yes # 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 + +LAYOUTS = numpad_5x4 diff --git a/keyboards/kakunpc/angel17/info.json b/keyboards/kakunpc/angel17/info.json new file mode 100644 index 0000000000..24a6c6be08 --- /dev/null +++ b/keyboards/kakunpc/angel17/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "angel17", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT_numpad_5x4": { + "layout": [ + {"label":"Num Lock", "x":0, "y":0}, + {"label":"/", "x":1, "y":0}, + {"label":"*", "x":2, "y":0}, + {"label":"-", "x":3, "y":0}, + + {"label":"7", "x":0, "y":1}, + {"label":"8", "x":1, "y":1}, + {"label":"9", "x":2, "y":1}, + + {"label":"4", "x":0, "y":2}, + {"label":"5", "x":1, "y":2}, + {"label":"6", "x":2, "y":2}, + {"label":"+", "x":3, "y":1, "h":2}, + + {"label":"1", "x":0, "y":3}, + {"label":"2", "x":1, "y":3}, + {"label":"3", "x":2, "y":3}, + + {"label":"0", "x":0, "y":4, "w":2}, + {"label":".", "x":2, "y":4}, + {"label":"Enter", "x":3, "y":3, "h":2} + ] + } + } +} diff --git a/keyboards/kakunpc/angel17/keymaps/default/keymap.c b/keyboards/kakunpc/angel17/keymaps/default/keymap.c new file mode 100644 index 0000000000..1b9f52846d --- /dev/null +++ b/keyboards/kakunpc/angel17/keymaps/default/keymap.c @@ -0,0 +1,38 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE, + COMMAND, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_numpad_5x4( /* Base */ + LT(COMMAND,KC_NLCK), 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 + ), + [COMMAND] = LAYOUT_numpad_5x4( /* Base */ + _______, KC_NO, KC_NO, RGB_RMOD, + KC_NO, KC_NO, KC_NO, + RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, + RGB_HUD, RGB_SAD, RGB_VAD, + RGB_TOG, KC_NO, KC_NO + ), +}; diff --git a/keyboards/kakunpc/angel17/keymaps/default/readme.md b/keyboards/kakunpc/angel17/keymaps/default/readme.md new file mode 100644 index 0000000000..a509fef7a3 --- /dev/null +++ b/keyboards/kakunpc/angel17/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for angel17
\ No newline at end of file diff --git a/keyboards/kakunpc/angel17/readme.md b/keyboards/kakunpc/angel17/readme.md new file mode 100644 index 0000000000..16914887a6 --- /dev/null +++ b/keyboards/kakunpc/angel17/readme.md @@ -0,0 +1,15 @@ +# angel17 + +![angel17](https://i.gyazo.com/30787446262c5818bc60e0ffb34c96ed.jpg) + +Keyboard for tablets. + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: angel17_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/angel17/rev1: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/kakunpc/angel17/rev1/config.h b/keyboards/kakunpc/angel17/rev1/config.h new file mode 100644 index 0000000000..a43208d2b9 --- /dev/null +++ b/keyboards/kakunpc/angel17/rev1/config.h @@ -0,0 +1,139 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel17 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 5 + +/* + * 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 { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } +#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 RGBLED_NUM 17 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#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 + +/* 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/kakunpc/angel17/rev1/rev1.c b/keyboards/kakunpc/angel17/rev1/rev1.c new file mode 100644 index 0000000000..40ff30e620 --- /dev/null +++ b/keyboards/kakunpc/angel17/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "rev1.h" diff --git a/keyboards/kakunpc/angel17/rev1/rev1.h b/keyboards/kakunpc/angel17/rev1/rev1.h new file mode 100644 index 0000000000..5b8600a206 --- /dev/null +++ b/keyboards/kakunpc/angel17/rev1/rev1.h @@ -0,0 +1,40 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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_numpad_5x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, \ + k20, k21, k22, k13, \ + k30, k31, k32, \ + k40, k41, k33 \ +) \ +{ \ + { k00, k10, k20, k31, k41 }, \ + { k02, k12, k22, k33, KC_NO }, \ + { k01, k11, k21, k32, KC_NO }, \ + { k03, k13, k30, k40, KC_NO }, \ +} diff --git a/keyboards/kakunpc/angel17/rev1/rules.mk b/keyboards/kakunpc/angel17/rev1/rules.mk new file mode 100644 index 0000000000..d0813eb5c3 --- /dev/null +++ b/keyboards/kakunpc/angel17/rev1/rules.mk @@ -0,0 +1,20 @@ +# 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 = yes # Console for debug +COMMAND_ENABLE = yes # 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 + +LAYOUTS = numpad_5x4 diff --git a/keyboards/kakunpc/angel17/rules.mk b/keyboards/kakunpc/angel17/rules.mk new file mode 100644 index 0000000000..35c999d465 --- /dev/null +++ b/keyboards/kakunpc/angel17/rules.mk @@ -0,0 +1,22 @@ +# 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 = yes # Console for debug +COMMAND_ENABLE = yes # 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 + +LAYOUTS = numpad_5x4 + +DEFAULT_FOLDER = kakunpc/angel17/rev1 diff --git a/keyboards/kakunpc/angel64/.noci b/keyboards/kakunpc/angel64/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/angel64/.noci diff --git a/keyboards/kakunpc/angel64/alpha/.noci b/keyboards/kakunpc/angel64/alpha/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/.noci diff --git a/keyboards/kakunpc/angel64/alpha/alpha.c b/keyboards/kakunpc/angel64/alpha/alpha.c new file mode 100644 index 0000000000..1c2936e157 --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/alpha.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "alpha.h" diff --git a/keyboards/kakunpc/angel64/alpha/alpha.h b/keyboards/kakunpc/angel64/alpha/alpha.h new file mode 100644 index 0000000000..6c0898a56a --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/alpha.h @@ -0,0 +1,48 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, \ + k28, k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, \ + k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64\ +) \ +{ \ + { k01, k13, k25, k37, k49, k61 }, \ + { k02, k14, k26, k38, k50, k62 }, \ + { k03, k15, k27, k39, k51, k63 }, \ + { k04, k16, k28, k40, k52, k64 }, \ + { k05, k17, k29, k41, k53, KC_NO }, \ + { k06, k18, k30, k42, k54, KC_NO }, \ + { k07, k19, k31, k43, k55, KC_NO }, \ + { k08, k20, k32, k44, k56, KC_NO }, \ + { k09, k21, k33, k45, k57, KC_NO }, \ + { k10, k22, k34, k46, k58, KC_NO }, \ + { k11, k23, k35, k47, k59, KC_NO }, \ + { k12, k24, k36, k48, k60, KC_NO } \ +} diff --git a/keyboards/kakunpc/angel64/alpha/config.h b/keyboards/kakunpc/angel64/alpha/config.h new file mode 100644 index 0000000000..b3270fdd8b --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/config.h @@ -0,0 +1,137 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A64 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel64 + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 64 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 25 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#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/kakunpc/angel64/alpha/info.json b/keyboards/kakunpc/angel64/alpha/info.json new file mode 100644 index 0000000000..6fceff4490 --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "angel64_alpha", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"back", "x":13, "y":0}, {"label":"Q", "x":0, "y":1, "w":1.5}, {"label":"W", "x":1.5, "y":1}, {"label":"E", "x":2.5, "y":1}, {"label":"R", "x":3.5, "y":1}, {"label":"T", "x":4.5, "y":1}, {"label":"Y", "x":5.5, "y":1}, {"label":"U", "x":6.5, "y":1}, {"label":"I", "x":7.5, "y":1}, {"label":"O", "x":8.5, "y":1}, {"label":"P", "x":9.5, "y":1}, {"label":"[", "x":10.5, "y":1}, {"label":"]", "x":11.5, "y":1}, {"label":"|", "x":12.5, "y":1, "w":1.5}, {"label":"Ctrl", "x":0, "y":2}, {"label":"A", "x":1, "y":2}, {"label":"S", "x":2, "y":2}, {"label":"D", "x":3, "y":2}, {"label":"F", "x":4, "y":2}, {"label":"G", "x":5, "y":2}, {"label":"H", "x":6, "y":2}, {"label":"J", "x":7, "y":2}, {"label":"K", "x":8, "y":2}, {"label":"L", "x":9, "y":2}, {"label":";:", "x":10, "y":2}, {"label":"`", "x":11, "y":2}, {"label":"Enter", "x":12, "y":2, "w":2}, {"label":"Shift", "x":0, "y":3, "w":1.5}, {"label":"Z", "x":1.5, "y":3}, {"label":"X", "x":2.5, "y":3}, {"label":"C", "x":3.5, "y":3}, {"label":"V", "x":4.5, "y":3}, {"label":"B", "x":5.5, "y":3}, {"label":"N", "x":6.5, "y":3}, {"label":"M", "x":7.5, "y":3}, {"label":"<", "x":8.5, "y":3}, {"label":">", "x":9.5, "y":3}, {"label":"?", "x":10.5, "y":3}, {"label":"\u2191", "x":11.5, "y":3}, {"label":"Fn", "x":12.5, "y":3, "w":1.5}, {"label":"Caps", "x":0, "y":4}, {"label":"Alt", "x":1, "y":4}, {"label":"Start", "x":2, "y":4, "w":1.5}, {"label":"Ctrl", "x":3.5, "y":4, "w":1.5}, {"label":"Space", "x":5, "y":4, "w":2}, {"label":"Ctrl", "x":7, "y":4, "w":1.5}, {"label":"Alt", "x":8.5, "y":4, "w":1.5}, {"label":"\u2190", "x":10, "y":4}, {"label":"\u2193", "x":11, "y":4}, {"label":"\u2192", "x":12, "y":4}, {"label":"Alt", "x":13, "y":4}] + } + } +} diff --git a/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c b/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c new file mode 100644 index 0000000000..0f2a8dada1 --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/keymaps/default/keymap.c @@ -0,0 +1,61 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE = 0, + COMMAND +}; + +#define KC_COMMAND LT(COMMAND,KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + LCTL_T(KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, + KC_TAB, KC_LALT, KC_LGUI, KC_COMMAND, KC_SPC, KC_COMMAND, KC_APP, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL), + [COMMAND] = LAYOUT( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, + KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, _______, KC_NO, _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), +}; + +#ifdef OLED_ENABLE +bool oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMAND\n"), false); + break; + default: + // Or use the write_ln shortcut over adding 'n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; +} +#endif diff --git a/keyboards/kakunpc/angel64/alpha/keymaps/default/readme.md b/keyboards/kakunpc/angel64/alpha/keymaps/default/readme.md new file mode 100644 index 0000000000..f4cd48f2ef --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for angel64
\ No newline at end of file diff --git a/keyboards/kakunpc/angel64/alpha/matrix.c b/keyboards/kakunpc/angel64/alpha/matrix.c new file mode 100644 index 0000000000..2851859cf2 --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/matrix.c @@ -0,0 +1,280 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 <http://www.gnu.org/licenses/>. +*/ +#include <stdint.h> +#include <stdbool.h> +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<<col)); +} + +inline +matrix_row_t matrix_get_row(uint8_t row) +{ + // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a + // switch blocker installed and the switch is always pressed. +#ifdef MATRIX_MASKED + return matrix[row] & matrix_mask[row]; +#else + return matrix[row]; +#endif +} + +void matrix_print(void) +{ + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + print_hex8(row); print(": "); + print_matrix_row(row); + print("\n"); + } +} + +uint8_t matrix_key_count(void) +{ + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +static void select_row(uint8_t row) +{ + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) +{ + setPinInputHigh(row_pins[row]); +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_col(uint8_t col) +{ + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) +{ + setPinInputHigh(col_pins[col]); +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < MATRIX_ROWS/2; row_index++) + { + uint8_t tmp = row_index + MATRIX_ROWS/2; + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[tmp]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) + { + // Pin LO, set col bit + current_matrix[tmp] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[tmp] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[tmp]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +void matrix_init(void) { + + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } + //else + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(raw_matrix, current_col); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return (uint8_t)changed; +} diff --git a/keyboards/kakunpc/angel64/alpha/readme.md b/keyboards/kakunpc/angel64/alpha/readme.md new file mode 100644 index 0000000000..4de66e6706 --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/readme.md @@ -0,0 +1,15 @@ +# angel64 + +![angel64](https://i.gyazo.com/6e2ea6c58d3253c496dc0518f2641ff9.jpg) + +Keyboard for tablets. + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: angel64_alpha, promicro +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/angel64/alpha: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/kakunpc/angel64/alpha/rules.mk b/keyboards/kakunpc/angel64/alpha/rules.mk new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/angel64/alpha/rules.mk diff --git a/keyboards/kakunpc/angel64/readme.md b/keyboards/kakunpc/angel64/readme.md new file mode 100644 index 0000000000..41f8233afb --- /dev/null +++ b/keyboards/kakunpc/angel64/readme.md @@ -0,0 +1,15 @@ +# angel64 + +![angel64](https://i.gyazo.com/d114d4b1789009dbe8c910eaeb3295c5.jpg) + +Keyboard for tablets. + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: angel64_alpha, angel64_rev1, promicro +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/angel64/rev1: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/kakunpc/angel64/rev1/config.h b/keyboards/kakunpc/angel64/rev1/config.h new file mode 100644 index 0000000000..b3270fdd8b --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/config.h @@ -0,0 +1,137 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A64 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT angel64 + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 64 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 25 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#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/kakunpc/angel64/rev1/info.json b/keyboards/kakunpc/angel64/rev1/info.json new file mode 100644 index 0000000000..fe6b4f5e05 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "angel64_rev1", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":2}, {"label":"A", "x":2, "y":2}, {"label":"S", "x":3, "y":2}, {"label":"D", "x":4, "y":2}, {"label":"F", "x":5, "y":2}, {"label":"G", "x":6, "y":2}, {"label":"H", "x":7, "y":2}, {"label":"J", "x":8, "y":2}, {"label":"K", "x":9, "y":2}, {"label":"L", "x":10, "y":2}, {"label":":", "x":11, "y":2}, {"label":"\"", "x":12, "y":2}, {"label":"Enter", "x":13, "y":2, "w":2}, {"label":"Shift", "x":0, "y":3, "w":2.5}, {"label":"Z", "x":2.5, "y":3}, {"label":"X", "x":3.5, "y":3}, {"label":"C", "x":4.5, "y":3}, {"label":"V", "x":5.5, "y":3}, {"label":"B", "x":6.5, "y":3}, {"label":"N", "x":7.5, "y":3}, {"label":"M", "x":8.5, "y":3}, {"label":"<", "x":9.5, "y":3}, {"label":">", "x":10.5, "y":3}, {"label":"?", "x":11.5, "y":3}, {"label":"Shift", "x":12.5, "y":3, "w":2.5}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Alt", "x":1.25, "y":4, "w":1.5}, {"label":"Win", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4}, {"x":5.25, "y":4, "w":1.5}, {"x":6.75, "y":4, "w":1.5}, {"x":8.25, "y":4, "w":1.5}, {"x":9.75, "y":4}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.5}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c b/keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c new file mode 100644 index 0000000000..7ad3964e24 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/keymaps/default/keymap.c @@ -0,0 +1,35 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_APP, KC_RCTL), +}; + +#ifdef OLED_ENABLE +bool oled_task_user(void) { + // Host Keyboard LED Status + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; +} +#endif diff --git a/keyboards/kakunpc/angel64/rev1/keymaps/default/readme.md b/keyboards/kakunpc/angel64/rev1/keymaps/default/readme.md new file mode 100644 index 0000000000..f4cd48f2ef --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for angel64
\ No newline at end of file diff --git a/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/config.h b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/config.h new file mode 100644 index 0000000000..bf1149ebc6 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here diff --git a/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c new file mode 100644 index 0000000000..6c5184c1b3 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/keymap.c @@ -0,0 +1,196 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#define USE_LED_RIPPLE_EFFECT +// #define RANDOM_RIPPLE_EFFECT + +#include QMK_KEYBOARD_H +#include "lufa.h" + +#ifdef USE_LED_RIPPLE_EFFECT +struct keybuf { + char col, row; + char frame; +}; +struct keybuf keybufs[256]; +unsigned char keybuf_begin, keybuf_end; + +unsigned char r = 0; +unsigned char g = 112; +unsigned char b = 255; +int col, row; +#endif + + +enum layers{ + BASE = 0, + COMMAND +}; + +#define KC_COMMAND_NUM LT(COMMAND,KC_F13) +#define KC_COMMAND_KANA LT(COMMAND,KC_F14) +#define KC_COMMAND LT(COMMAND,KC_SPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_all( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LGUI, KC_COMMAND_NUM, KC_SPC, KC_SPC, KC_SPC, KC_COMMAND_KANA, KC_RALT, MO(COMMAND),KC_RCTL), + [COMMAND] = LAYOUT_all( + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, + KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_LCTL, KC_NO, KC_NO, _______, KC_NO, RGB_MOD, KC_NO, _______, KC_NO, _______, KC_NO), +}; + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { +#ifdef USE_LED_RIPPLE_EFFECT + col = record->event.key.col; + row = record->event.key.row; + if (record->event.pressed) { + int end = keybuf_end; + keybufs[end].col = col; + keybufs[end].row = row; + keybufs[end].frame = 0; + keybuf_end ++; + } +#endif + return true; +} + +void keyboard_post_init_user(void) { +#ifdef USE_LED_RIPPLE_EFFECT + rgblight_enable_noeeprom(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); +#endif +} + +#ifdef USE_LED_RIPPLE_EFFECT +int scan_count = -10; +int keys[] = { 14, 14, 13, 12, 11 }; +int keys_sum[] = { 0, 14, 28, 41, 53 }; +unsigned char rgb[14][5][3]; +int row_max = 12; +int ToIndex(char _col, char _row) { + return (_col * row_max) + _row; +} + +void led_ripple_effect(void){ + if (scan_count == -1) { + rgblight_enable_noeeprom(); + rgblight_mode(RGBLIGHT_MODE_STATIC_LIGHT); + } else if (scan_count >= 0 && scan_count < 5) { + for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) { + int i = c; + // FIXME: + + int index = ToIndex(keybufs[i].col,keybufs[i].row); + int coll = 0; + for(int s = 4; s >= 0; --s){ + if( index >= keys_sum[s]){ + coll = s; + break; + } + } + int roww = MAX(0,index - keys_sum[coll]); + + int y = scan_count; + int dist_y = abs(y - coll); + for (int x=0; x<keys[y]; x++) { + int dist = abs(x - roww) + dist_y; + if (dist <= keybufs[i].frame) { + int elevation = MAX(0, (8 + dist - keybufs[i].frame)) << 2; + if (elevation) { + if ((rgb[x][y][0] != 255) && r) { rgb[x][y][0] = MIN(255, elevation + rgb[x][y][0]); } + if ((rgb[x][y][1] != 255) && g) { rgb[x][y][1] = MIN(255, elevation + rgb[x][y][1]); } + if ((rgb[x][y][2] != 255) && b) { rgb[x][y][2] = MIN(255, elevation + rgb[x][y][2]); } + } + } + } + } + } else if (scan_count == 5) { + for (unsigned char c=keybuf_begin; c!=keybuf_end; c++) { + int i = c; + if (keybufs[i].frame < 64) { + keybufs[i].frame ++; + } else { + keybuf_begin ++; + } + } + } else if (scan_count >= 6 && scan_count <= 10) { + int y = scan_count - 6; + for (int x=0; x<keys[y]; x++) { + int at = keys_sum[y] + x; + led[at].r = rgb[x][y][0]; + led[at].g = rgb[x][y][1]; + led[at].b = rgb[x][y][2]; + } + rgblight_set(); + } else if (scan_count == 11) { + memset(rgb, 0, sizeof(rgb)); + } + scan_count++; + if (scan_count >= 12) { scan_count = 0; } +} + +#endif + +void matrix_scan_user(void) { +#ifdef USE_LED_RIPPLE_EFFECT +#ifdef RANDOM_RIPPLE_EFFECT + static int timer = 0; + static int timeout = 300; + timer++; + if(timer > timeout){ + int end = keybuf_end; + col = rand() % 6; + row = rand() % 12; + keybufs[end].col = col; + keybufs[end].row = row; + keybufs[end].frame = 0; + keybuf_end ++; + timer = rand() % timeout; + } +#endif + led_ripple_effect(); +#endif +} + +#ifdef OLED_ENABLE +bool oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMAND\n"), false); + break; + default: + // Or use the write_ln shortcut over adding 'n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + return false; +} +#endif diff --git a/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/readme.md b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/readme.md new file mode 100644 index 0000000000..ca7d7961fc --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/keymaps/kakunpc/readme.md @@ -0,0 +1 @@ +# The kakunpc keymap for angel64 diff --git a/keyboards/kakunpc/angel64/rev1/matrix.c b/keyboards/kakunpc/angel64/rev1/matrix.c new file mode 100644 index 0000000000..2851859cf2 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/matrix.c @@ -0,0 +1,280 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 <http://www.gnu.org/licenses/>. +*/ +#include <stdint.h> +#include <stdbool.h> +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<<col)); +} + +inline +matrix_row_t matrix_get_row(uint8_t row) +{ + // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a + // switch blocker installed and the switch is always pressed. +#ifdef MATRIX_MASKED + return matrix[row] & matrix_mask[row]; +#else + return matrix[row]; +#endif +} + +void matrix_print(void) +{ + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + print_hex8(row); print(": "); + print_matrix_row(row); + print("\n"); + } +} + +uint8_t matrix_key_count(void) +{ + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +static void select_row(uint8_t row) +{ + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) +{ + setPinInputHigh(row_pins[row]); +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_col(uint8_t col) +{ + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) +{ + setPinInputHigh(col_pins[col]); +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < MATRIX_ROWS/2; row_index++) + { + uint8_t tmp = row_index + MATRIX_ROWS/2; + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[tmp]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) + { + // Pin LO, set col bit + current_matrix[tmp] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[tmp] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[tmp]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +void matrix_init(void) { + + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } + //else + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(raw_matrix, current_col); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return (uint8_t)changed; +} diff --git a/keyboards/kakunpc/angel64/rev1/readme.md b/keyboards/kakunpc/angel64/rev1/readme.md new file mode 100644 index 0000000000..4809710a43 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/readme.md @@ -0,0 +1,15 @@ +# angel64 + +![angel64](https://i.gyazo.com/d114d4b1789009dbe8c910eaeb3295c5.jpg) + +Keyboard for tablets. + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: angel64_rev1, promicro +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/angel64/rev1: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/kakunpc/angel64/rev1/rev1.c b/keyboards/kakunpc/angel64/rev1/rev1.c new file mode 100644 index 0000000000..40ff30e620 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "rev1.h" diff --git a/keyboards/kakunpc/angel64/rev1/rev1.h b/keyboards/kakunpc/angel64/rev1/rev1.h new file mode 100644 index 0000000000..f4335601a9 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/rev1.h @@ -0,0 +1,48 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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_all( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, \ + k15, k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, \ + k29, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k40, k41, \ + k42, k43, k44, k45, k46, k47, k48, k49, k50, k51, k52, k53, \ + k54, k55, k56, k57, k58, k59, k60, k61, k62, k63, k64\ +) \ +{ \ + { k01, k13, k25, k37, k49, k61 }, \ + { k02, k14, k26, k38, k50, k62 }, \ + { k03, k15, k27, k39, k51, k63 }, \ + { k04, k16, k28, k40, k52, k64 }, \ + { k05, k17, k29, k41, k53, KC_NO }, \ + { k06, k18, k30, k42, k54, KC_NO }, \ + { k07, k19, k31, k43, k55, KC_NO }, \ + { k08, k20, k32, k44, k56, KC_NO }, \ + { k09, k21, k33, k45, k57, KC_NO }, \ + { k10, k22, k34, k46, k58, KC_NO }, \ + { k11, k23, k35, k47, k59, KC_NO }, \ + { k12, k24, k36, k48, k60, KC_NO } \ +} diff --git a/keyboards/kakunpc/angel64/rev1/rules.mk b/keyboards/kakunpc/angel64/rev1/rules.mk new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/angel64/rev1/rules.mk diff --git a/keyboards/kakunpc/angel64/rules.mk b/keyboards/kakunpc/angel64/rules.mk new file mode 100644 index 0000000000..ca4e93f35c --- /dev/null +++ b/keyboards/kakunpc/angel64/rules.mk @@ -0,0 +1,25 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = no # 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 +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +CUSTOM_MATRIX = yes + +SRC += matrix.c + +DEFAULT_FOLDER = kakunpc/angel64/rev1 diff --git a/keyboards/kakunpc/business_card/.noci b/keyboards/kakunpc/business_card/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/business_card/.noci diff --git a/keyboards/kakunpc/business_card/alpha/.noci b/keyboards/kakunpc/business_card/alpha/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/.noci diff --git a/keyboards/kakunpc/business_card/alpha/alpha.c b/keyboards/kakunpc/business_card/alpha/alpha.c new file mode 100644 index 0000000000..1c2936e157 --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/alpha.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "alpha.h" diff --git a/keyboards/kakunpc/business_card/alpha/alpha.h b/keyboards/kakunpc/business_card/alpha/alpha.h new file mode 100644 index 0000000000..9807576899 --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/alpha.h @@ -0,0 +1,35 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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, \ + k10, k11, k12 \ +) \ +{ \ + { k00, k01, k02 }, \ + { k10, k11, k12 }, \ +} diff --git a/keyboards/kakunpc/business_card/alpha/config.h b/keyboards/kakunpc/business_card/alpha/config.h new file mode 100644 index 0000000000..81bb16161f --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/config.h @@ -0,0 +1,138 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT business_card + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 3 + +/* + * 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 { B2, B6 } +#define MATRIX_COL_PINS { E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#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 + +/* 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/kakunpc/business_card/alpha/info.json b/keyboards/kakunpc/business_card/alpha/info.json new file mode 100644 index 0000000000..57f0fbd9a6 --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "business_card alpha", + "url": "", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"1", "x":0, "y":0}, + {"label":"2", "x":1, "y":0}, + {"label":"3", "x":2, "y":0}, + {"label":"4", "x":0, "y":1}, + {"label":"5", "x":1, "y":1}, + {"label":"6", "x":2, "y":1} + ] + } + } +} diff --git a/keyboards/kakunpc/business_card/alpha/keymaps/default/config.h b/keyboards/kakunpc/business_card/alpha/keymaps/default/config.h new file mode 100644 index 0000000000..7c15789bdf --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/keymaps/default/config.h @@ -0,0 +1,22 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS +#endif diff --git a/keyboards/kakunpc/business_card/alpha/keymaps/default/keymap.c b/keyboards/kakunpc/business_card/alpha/keymaps/default/keymap.c new file mode 100644 index 0000000000..64070d23d2 --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user + +const uint16_t PROGMEM +keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = +LAYOUT(/* Base */ + KC_1, KC_2, KC_3, + KC_4, KC_5, KC_6 +), +}; + +void keyboard_post_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD); +} + +#ifdef OLED_ENABLE +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0}; + + oled_write_P(qmk_logo, false); +} +bool oled_task_user(void) { + render_logo(); + return false; +} +#endif diff --git a/keyboards/kakunpc/business_card/alpha/keymaps/default/readme.md b/keyboards/kakunpc/business_card/alpha/keymaps/default/readme.md new file mode 100644 index 0000000000..22cc77eebf --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for business_card
\ No newline at end of file diff --git a/keyboards/kakunpc/business_card/alpha/rules.mk b/keyboards/kakunpc/business_card/alpha/rules.mk new file mode 100644 index 0000000000..e85829c110 --- /dev/null +++ b/keyboards/kakunpc/business_card/alpha/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # 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 +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/kakunpc/business_card/beta/beta.c b/keyboards/kakunpc/business_card/beta/beta.c new file mode 100644 index 0000000000..7a9aa1b9bd --- /dev/null +++ b/keyboards/kakunpc/business_card/beta/beta.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "beta.h" diff --git a/keyboards/kakunpc/business_card/beta/beta.h b/keyboards/kakunpc/business_card/beta/beta.h new file mode 100644 index 0000000000..21a334e8a9 --- /dev/null +++ b/keyboards/kakunpc/business_card/beta/beta.h @@ -0,0 +1,37 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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, \ + k10, k11, \ + k20, k21 \ +) \ +{ \ + { k21, k20 }, \ + { k11, k10 }, \ + { k01, k00 }, \ +} diff --git a/keyboards/kakunpc/business_card/beta/config.h b/keyboards/kakunpc/business_card/beta/config.h new file mode 100644 index 0000000000..9e4e8da963 --- /dev/null +++ b/keyboards/kakunpc/business_card/beta/config.h @@ -0,0 +1,138 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT business_card + +/* key matrix size */ +#define MATRIX_ROWS 3 +#define MATRIX_COLS 2 + +/* + * 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 { B3, B2, B6 } +#define MATRIX_COL_PINS { B4, B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#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 + +/* 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/kakunpc/business_card/beta/info.json b/keyboards/kakunpc/business_card/beta/info.json new file mode 100644 index 0000000000..58f2a5b20d --- /dev/null +++ b/keyboards/kakunpc/business_card/beta/info.json @@ -0,0 +1,17 @@ +{ + "keyboard_name": "business_card beta", + "url": "", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"1", "x":0, "y":0}, + {"label":"2", "x":1, "y":0}, + {"label":"3", "x":0, "y":1}, + {"label":"4", "x":1, "y":1}, + {"label":"5", "x":0, "y":2}, + {"label":"6", "x":1, "y":2} + ] + } + } +} diff --git a/keyboards/kakunpc/business_card/beta/keymaps/default/config.h b/keyboards/kakunpc/business_card/beta/keymaps/default/config.h new file mode 100644 index 0000000000..e04ba7e4d0 --- /dev/null +++ b/keyboards/kakunpc/business_card/beta/keymaps/default/config.h @@ -0,0 +1,23 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here + +#ifdef RGB_DI_PIN + #define RGBLIGHT_ANIMATIONS +#endif
\ No newline at end of file diff --git a/keyboards/kakunpc/business_card/beta/keymaps/default/keymap.c b/keyboards/kakunpc/business_card/beta/keymaps/default/keymap.c new file mode 100644 index 0000000000..8d2413477e --- /dev/null +++ b/keyboards/kakunpc/business_card/beta/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM +keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = +LAYOUT(/* Base */ + KC_1, KC_2, + KC_3, KC_4, + KC_5, KC_6 +), +}; + +void matrix_init_user(void) { + rgblight_enable_noeeprom(); + rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_MOOD); +} + +#ifdef OLED_ENABLE +static void render_logo(void) { + static const char PROGMEM qmk_logo[] = {0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, + 0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0}; + + oled_write_P(qmk_logo, false); +} +bool oled_task_user(void) { + render_logo(); + return false; +} +#endif diff --git a/keyboards/kakunpc/business_card/beta/keymaps/default/readme.md b/keyboards/kakunpc/business_card/beta/keymaps/default/readme.md new file mode 100644 index 0000000000..22cc77eebf --- /dev/null +++ b/keyboards/kakunpc/business_card/beta/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for business_card
\ No newline at end of file diff --git a/keyboards/kakunpc/business_card/beta/rules.mk b/keyboards/kakunpc/business_card/beta/rules.mk new file mode 100644 index 0000000000..e85829c110 --- /dev/null +++ b/keyboards/kakunpc/business_card/beta/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # 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 +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 diff --git a/keyboards/kakunpc/business_card/business_card.c b/keyboards/kakunpc/business_card/business_card.c new file mode 100644 index 0000000000..01beb28220 --- /dev/null +++ b/keyboards/kakunpc/business_card/business_card.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "business_card.h" diff --git a/keyboards/kakunpc/business_card/business_card.h b/keyboards/kakunpc/business_card/business_card.h new file mode 100644 index 0000000000..125c3080d6 --- /dev/null +++ b/keyboards/kakunpc/business_card/business_card.h @@ -0,0 +1,25 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#pragma once + +#ifdef KEYBOARD_kakunpc_business_card_alpha + #include "alpha.h" +#endif +#ifdef KEYBOARD_kakunpc_business_card_beta + #include "beta.h" +#endif + +#include "quantum.h" diff --git a/keyboards/kakunpc/business_card/config.h b/keyboards/kakunpc/business_card/config.h new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/business_card/config.h diff --git a/keyboards/kakunpc/business_card/readme.md b/keyboards/kakunpc/business_card/readme.md new file mode 100644 index 0000000000..cbd05af410 --- /dev/null +++ b/keyboards/kakunpc/business_card/readme.md @@ -0,0 +1,15 @@ +# business_card + +![business_card](imgur.com image replace me!) + +A short description of the keyboard/project + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: The PCBs, controllers supported +Hardware Availability: links to where you can find this hardware + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/business_card/beta: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/kakunpc/business_card/rules.mk b/keyboards/kakunpc/business_card/rules.mk new file mode 100644 index 0000000000..ad9ea936af --- /dev/null +++ b/keyboards/kakunpc/business_card/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # 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 + +DEFAULT_FOLDER = kakunpc/business_card/beta diff --git a/keyboards/kakunpc/choc_taro/choc_taro.c b/keyboards/kakunpc/choc_taro/choc_taro.c new file mode 100644 index 0000000000..2a835b2bd8 --- /dev/null +++ b/keyboards/kakunpc/choc_taro/choc_taro.c @@ -0,0 +1,17 @@ +/* Copyright 2020 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include "choc_taro.h" diff --git a/keyboards/kakunpc/choc_taro/choc_taro.h b/keyboards/kakunpc/choc_taro/choc_taro.h new file mode 100644 index 0000000000..cf07b80b5c --- /dev/null +++ b/keyboards/kakunpc/choc_taro/choc_taro.h @@ -0,0 +1,342 @@ +/* Copyright 2020 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +/* This is 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. + */ + +/* LAYOUT_all + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│014│015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│114 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213 │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│312 │313│ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┴───┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_all( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, k313, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { k015, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_ansi + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│ 014 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│114 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213 │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│ 312 │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───────┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_ansi( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, KC_NO, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_ansi_split_bs + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│014│015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│114 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213 │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────────┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│ 312 │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───────┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_ansi_split_bs( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, KC_NO, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { k015, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + + +/* LAYOUT_ansi_split_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│ 014 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│114 │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213 │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│312 │313│ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┴───┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_ansi_split_rshift( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, k313, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + + +/* LAYOUT_iso + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│ 014 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 │ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│ 312 │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───────┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_iso( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, KC_NO, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_iso_split_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│ 014 │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 │ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│312 │313│ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┴───┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_iso_split_rshift( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, k313, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_iso_split_bs + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│014│015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 │ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│ 312 │ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───────┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_iso_split_bs( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, KC_NO, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { k015, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} + +/* LAYOUT_iso_split_bs_rshift + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │001│002│003│004│005│006│007│008│009│010│011│012│013│014│015│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │101 │102│103│104│105│106│107│108│109│110│111│112│113│ │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┐114 │ + * │201 │202│203│204│205│206│207│208│209│210│211│212│213│ │ + * ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴┬───┤ + * │301 │301│302│303│304│305│306│307│308│309│310│311│312 │313│ + * ├────┼───┴┬──┴─┬─┴───┴──┬┴───┼───┴───┴──┬┴──┬┴──┬┴──┬───┴───┤ + * │▓▓▓▓│401 │402 │403 │404 │405 │406│407│408│▓▓▓▓▓▓▓│ + * └────┴────┴────┴────────┴────┴──────────┴───┴───┴───┴───────┘ +*/ +#define LAYOUT_iso_split_bs_rshift( \ + k001, k002, k003, k004, k005, k006, k007, k008, k009, k010, k011, k012, k013, k014, k015, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k110, k111, k112, k113, k114, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k210, k211, k212, k213, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k310, k311, k312, k313, \ + k401, k402, k403, k404, k405, k406, k407, k408 \ +) \ +{ \ + { k009, k109, k209, k309, KC_NO } , \ + { k010, k110, k210, k310, KC_NO } , \ + { k011, k111, k211, k311, KC_NO } , \ + { k012, k112, k212, k312, KC_NO } , \ + { k013, k113, k213, k313, KC_NO } , \ + { k014, k114, KC_NO, KC_NO, KC_NO } , \ + { k015, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } , \ + { k001, k101, k201, k301, k401 } , \ + { k002, k102, k202, k302, k402 } , \ + { k003, k103, k203, k303, k403 } , \ + { k004, k104, k204, k304, k404 } , \ + { k005, k105, k205, k305, k405 } , \ + { k006, k106, k206, k306, k406 } , \ + { k007, k107, k207, k307, k407 } , \ + { k008, k108, k208, k308, k408 } \ +} diff --git a/keyboards/kakunpc/choc_taro/config.h b/keyboards/kakunpc/choc_taro/config.h new file mode 100644 index 0000000000..2852206b14 --- /dev/null +++ b/keyboards/kakunpc/choc_taro/config.h @@ -0,0 +1,143 @@ +/* +Copyright 2020 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter + VID & PID are lisenced from microchip sublisence program, Don't use other project! */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB60 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT choc_taro + +/* key matrix size */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 5 +/* + * 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, F5, F6, F7, B1, B3, B2, B6 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +// #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 + +/* 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 + +/* disable these deprecated features by default */ +#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/kakunpc/choc_taro/info.json b/keyboards/kakunpc/choc_taro/info.json new file mode 100644 index 0000000000..3a193ee05e --- /dev/null +++ b/keyboards/kakunpc/choc_taro/info.json @@ -0,0 +1,556 @@ +{ + "keyboard_name": "choc_taro", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT_all": { + "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":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_ansi": { + "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":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_ansi_split_bs": { + "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":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_ansi_split_rshift": { + "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":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.5, "y":1, "w":1.5}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2, "w":2.25}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_iso": { + "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":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_iso_split_rshift": { + "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":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0, "w":2}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_iso_split_bs": { + "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":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":2.75}, + + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + }, + "LAYOUT_iso_split_bs_rshift": { + "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":6, "y":0}, + {"x":7, "y":0}, + {"x":8, "y":0}, + {"x":9, "y":0}, + {"x":10, "y":0}, + {"x":11, "y":0}, + {"x":12, "y":0}, + {"x":13, "y":0}, + {"x":14, "y":0}, + + {"x":0, "y":1, "w":1.5}, + {"x":1.5, "y":1}, + {"x":2.5, "y":1}, + {"x":3.5, "y":1}, + {"x":4.5, "y":1}, + {"x":5.5, "y":1}, + {"x":6.5, "y":1}, + {"x":7.5, "y":1}, + {"x":8.5, "y":1}, + {"x":9.5, "y":1}, + {"x":10.5, "y":1}, + {"x":11.5, "y":1}, + {"x":12.5, "y":1}, + {"x":13.75, "y":1, "w":1.25, "h":2}, + + {"x":0, "y":2, "w":1.75}, + {"x":1.75, "y":2}, + {"x":2.75, "y":2}, + {"x":3.75, "y":2}, + {"x":4.75, "y":2}, + {"x":5.75, "y":2}, + {"x":6.75, "y":2}, + {"x":7.75, "y":2}, + {"x":8.75, "y":2}, + {"x":9.75, "y":2}, + {"x":10.75, "y":2}, + {"x":11.75, "y":2}, + {"x":12.75, "y":2}, + + {"x":0, "y":3, "w":2.25}, + {"x":2.25, "y":3}, + {"x":3.25, "y":3}, + {"x":4.25, "y":3}, + {"x":5.25, "y":3}, + {"x":6.25, "y":3}, + {"x":7.25, "y":3}, + {"x":8.25, "y":3}, + {"x":9.25, "y":3}, + {"x":10.25, "y":3}, + {"x":11.25, "y":3}, + {"x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + + {"x":1.25, "y":4, "w":1.25}, + {"x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":2.25}, + {"x":6, "y":4, "w":1.25}, + {"x":7.25, "y":4, "w":2.75}, + {"x":10, "y":4, "w":1.25}, + {"x":11.25, "y":4, "w":1.25}, + {"x":12.5, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/kakunpc/choc_taro/keymaps/default/keymap.c b/keyboards/kakunpc/choc_taro/keymaps/default/keymap.c new file mode 100644 index 0000000000..4de3c2d55a --- /dev/null +++ b/keyboards/kakunpc/choc_taro/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +/* Copyright 2020 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ) +}; diff --git a/keyboards/kakunpc/choc_taro/keymaps/default/readme.md b/keyboards/kakunpc/choc_taro/keymaps/default/readme.md new file mode 100644 index 0000000000..a2cb119040 --- /dev/null +++ b/keyboards/kakunpc/choc_taro/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for choc_taro diff --git a/keyboards/kakunpc/choc_taro/keymaps/via/keymap.c b/keyboards/kakunpc/choc_taro/keymaps/via/keymap.c new file mode 100644 index 0000000000..a1d48eb5e9 --- /dev/null +++ b/keyboards/kakunpc/choc_taro/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL + ), + [1] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/kakunpc/choc_taro/keymaps/via/readme.md b/keyboards/kakunpc/choc_taro/keymaps/via/readme.md new file mode 100644 index 0000000000..cb3af77dfa --- /dev/null +++ b/keyboards/kakunpc/choc_taro/keymaps/via/readme.md @@ -0,0 +1,3 @@ +# The default keymap for choc_taro + +This is an experimental. Use at your own risk. diff --git a/keyboards/kakunpc/choc_taro/keymaps/via/rules.mk b/keyboards/kakunpc/choc_taro/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/kakunpc/choc_taro/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kakunpc/choc_taro/matrix.c b/keyboards/kakunpc/choc_taro/matrix.c new file mode 100644 index 0000000000..02421551da --- /dev/null +++ b/keyboards/kakunpc/choc_taro/matrix.c @@ -0,0 +1,156 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 <http://www.gnu.org/licenses/>. +*/ +#include <stdint.h> +#include <stdbool.h> +#include "matrix.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +static void select_row(uint8_t row) { + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) { + setPinInputHigh(row_pins[row]); +} + +static void unselect_rows(void) { + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_col(uint8_t col) { + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) { + setPinInputHigh(col_pins[col]); +} + +static void unselect_cols(void) { + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + unselect_cols(); + + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } + + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) { + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + matrix_io_delay(); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) { + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + matrix_io_delay(); + + // For each row... + for(uint8_t row_index = 0; row_index < MATRIX_ROWS / 2; row_index++) { + uint8_t tmp = row_index + MATRIX_ROWS / 2; + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[tmp]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) { + // Pin LO, set col bit + current_matrix[tmp] |= (ROW_SHIFTER << current_col); + } else { + // Pin HI, clear col bit + current_matrix[tmp] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[tmp]) && !(matrix_changed)) { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +void matrix_init_custom(void) { + // initialize key pins + init_pins(); +} + +bool matrix_scan_custom(matrix_row_t current_matrix[]) { + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { + changed |= read_cols_on_row(current_matrix, current_row); + } + + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(current_matrix, current_col); + } + + return changed; +} diff --git a/keyboards/kakunpc/choc_taro/readme.md b/keyboards/kakunpc/choc_taro/readme.md new file mode 100644 index 0000000000..8e641c72b8 --- /dev/null +++ b/keyboards/kakunpc/choc_taro/readme.md @@ -0,0 +1,15 @@ +# choc_taro + +![choc_taro](https://i.gyazo.com/717ddeed13cd2f956ed01b71c6e96f87.jpg) + +gh60 compatible choc keyboard + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: choc taro pcb +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/choc_taro: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/kakunpc/choc_taro/rules.mk b/keyboards/kakunpc/choc_taro/rules.mk new file mode 100644 index 0000000000..b8b8a0bc35 --- /dev/null +++ b/keyboards/kakunpc/choc_taro/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # 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 + +CUSTOM_MATRIX = lite +SRC += matrix.c diff --git a/keyboards/kakunpc/rabbit_capture_plan/config.h b/keyboards/kakunpc/rabbit_capture_plan/config.h new file mode 100644 index 0000000000..b622d33c1a --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/config.h @@ -0,0 +1,148 @@ +/* +Copyright 2020 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter + VID & PID are lisenced from microchip sublisence program, Don't use other project! */ +#define VENDOR_ID 0x04D8 +#define PRODUCT_ID 0xEB59 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT rabbit_capture_plan + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 8 + +/* + * 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 { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 + +//#define BACKLIGHT_PIN B7 +//#define BACKLIGHT_LEVELS 3 +//#define BACKLIGHT_BREATHING + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN +#define RGBLED_SPLIT {32, 37} +# define RGBLED_NUM 69 +# define RGBLIGHT_HUE_STEP 8 +# define RGBLIGHT_SAT_STEP 8 +# define RGBLIGHT_VAL_STEP 8 +# define RGBLIGHT_LIMIT_VAL 200 /* The maximum brightness level */ +# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +# define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +//# define RGBLIGHT_EFFECT_BREATHING +//# define RGBLIGHT_EFFECT_RAINBOW_MOOD +//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL +//# define RGBLIGHT_EFFECT_SNAKE +//# define RGBLIGHT_EFFECT_KNIGHT +//# define RGBLIGHT_EFFECT_CHRISTMAS +//# define RGBLIGHT_EFFECT_STATIC_GRADIENT +//# define RGBLIGHT_EFFECT_RGB_TEST +//# define RGBLIGHT_EFFECT_ALTERNATING +/*== customize breathing effect ==*/ +/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +/*==== use exp() and sin() ====*/ +//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#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 + +/* 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 useful 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 + +/* disable these deprecated features by default */ +#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/kakunpc/rabbit_capture_plan/info.json b/keyboards/kakunpc/rabbit_capture_plan/info.json new file mode 100644 index 0000000000..4a660cf85e --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/info.json @@ -0,0 +1,308 @@ +{ + "keyboard_name": "rabbit_capture_plan", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT_all": { + "layout": [ + { + "x": 0.66, + "y": 0 + }, + { + "x": 1.6600000000000001, + "y": 0 + }, + { + "x": 2.97, + "y": 0 + }, + { + "x": 3.97, + "y": 0 + }, + { + "x": 4.97, + "y": 0 + }, + { + "x": 5.97, + "y": 0 + }, + { + "x": 6.97, + "y": 0 + }, + { + "x": 9.87, + "y": 0 + }, + { + "x": 10.87, + "y": 0 + }, + { + "x": 11.87, + "y": 0 + }, + { + "x": 12.87, + "y": 0 + }, + { + "x": 14.32, + "y": 0 + }, + { + "x": 15.32, + "y": 0 + }, + { + "x": 16.32, + "y": 0 + }, + { + "x": 17.32, + "y": 0 + }, + + + + { + "x": 0.53, + "y": 1, + "w": 1.5 + }, + { + "x": 2.03, + "y": 1 + }, + { + "x": 3.47, + "y": 1 + }, + { + "x": 4.47, + "y": 1 + }, + { + "x": 5.47, + "y": 1 + }, + { + "x": 6.47, + "y": 1 + }, + { + "x": 7.47, + "y": 1 + }, + { + "x": 9.37, + "y": 1 + }, + { + "x": 10.37, + "y": 1 + }, + { + "x": 11.37, + "y": 1 + }, + { + "x": 12.37, + "y": 1 + }, + { + "x": 13.97, + "y": 1 + }, + { + "x": 14.97, + "y": 1 + }, + { + "x": 15.97, + "y": 1 + }, + { + "x": 16.97, + "y": 1, + "w": 1.5 + }, + + + + { + "x": 0.39, + "y": 2, + "w": 1.75 + }, + { + "x": 2.14, + "y": 2 + }, + { + "x": 3.72, + "y": 2 + }, + { + "x": 4.72, + "y": 2 + }, + { + "x": 5.72, + "y": 2 + }, + { + "x": 6.72, + "y": 2 + }, + { + "x": 7.72, + "y": 2 + }, + { + "x": 9.62, + "y": 2 + }, + { + "x": 10.62, + "y": 2 + }, + { + "x": 11.62, + "y": 2 + }, + { + "x": 12.62, + "y": 2 + }, + { + "x": 14.34, + "y": 2 + }, + { + "x": 15.34, + "y": 2 + }, + { + "x": 16.34, + "y": 2, + "w": 2.25 + }, + + + + { + "x": 0.25, + "y": 3, + "w": 2.25 + }, + { + "x": 2.5, + "y": 3 + }, + { + "x": 4.22, + "y": 3 + }, + { + "x": 5.22, + "y": 3 + }, + { + "x": 6.22, + "y": 3 + }, + { + "x": 7.22, + "y": 3 + }, + { + "x": 9.12, + "y": 3 + }, + { + "x": 10.12, + "y": 3 + }, + { + "x": 11.12, + "y": 3 + }, + { + "x": 12.12, + "y": 3 + }, + { + "x": 13.97, + "y": 3 + }, + { + "x": 14.97, + "y": 3 + }, + { + "x": 15.97, + "y": 3 + }, + { + "x": 16.97, + "y": 3 + }, + { + "x": 18.25, + "y": 3.25 + }, + + + + { + "x": 0.5, + "y": 4, + "w": 1.25 + }, + { + "x": 1.75, + "y": 4, + "w": 1.25 + }, + { + "x": 4.72, + "y": 4 + }, + { + "x": 5.72, + "y": 4, + "w": 2 + }, + { + "x": 7.72, + "y": 4 + }, + { + "x": 9.6, + "y": 4, + "w": 2.75 + }, + { + "x": 12.35, + "y": 4 + }, + { + "x": 17.25, + "y": 4.25 + }, + { + "x": 18.25, + "y": 4.25 + }, + { + "x": 19.25, + "y": 4.25 + } + ] + } + } +} diff --git a/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/keymap.c b/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/keymap.c new file mode 100644 index 0000000000..cbfb6b1410 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2020 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum layers{ + _BASE, + _FN +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [_BASE] = LAYOUT_all( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, + KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [_FN] = LAYOUT_all( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), +}; diff --git a/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/readme.md b/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/readme.md new file mode 100644 index 0000000000..2ececc3fc2 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for rabbit_capture_plan diff --git a/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/keymap.c b/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/keymap.c new file mode 100644 index 0000000000..f8109f4f08 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2020 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base */ + [0] = LAYOUT_all( + KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, + KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_DEL, KC_UP, + KC_LCTRL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_RIGHT + ), + [1] = LAYOUT_all( + RESET, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [2] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/readme.md b/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/readme.md new file mode 100644 index 0000000000..928cdb8b77 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/readme.md @@ -0,0 +1 @@ +# The via keymap for rabbit_capture_plan diff --git a/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/rules.mk b/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/rules.mk new file mode 100644 index 0000000000..1e5b99807c --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/keymaps/via/rules.mk @@ -0,0 +1 @@ +VIA_ENABLE = yes diff --git a/keyboards/kakunpc/rabbit_capture_plan/rabbit_capture_plan.c b/keyboards/kakunpc/rabbit_capture_plan/rabbit_capture_plan.c new file mode 100644 index 0000000000..7a45e61f35 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/rabbit_capture_plan.c @@ -0,0 +1,17 @@ +/* Copyright 2020 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#include "rabbit_capture_plan.h" diff --git a/keyboards/kakunpc/rabbit_capture_plan/rabbit_capture_plan.h b/keyboards/kakunpc/rabbit_capture_plan/rabbit_capture_plan.h new file mode 100644 index 0000000000..8065fdfeb9 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/rabbit_capture_plan.h @@ -0,0 +1,47 @@ +/* Copyright 2020 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +/* This is 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_all( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, R07, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, R17, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, R36, R37, R38, \ + L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ +) \ +{ \ + { L00, L01, L02, L03, L04, L05, L06, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, KC_NO, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, KC_NO, KC_NO }, \ + { L40, L41, L42, L43, L44, L26, KC_NO, KC_NO }, \ + { R00, R01, R02, R03, R04, R05, R06, R07 }, \ + { R10, R11, R12, R13, R14, R15, R16, R17 }, \ + { R20, R21, R22, R23, R24, R25, R26, KC_NO }, \ + { R30, R31, R32, R33, R34, R35, R36, R37 }, \ + { R38, R40, R41, R42, R43, R44, KC_NO, KC_NO } \ +} diff --git a/keyboards/kakunpc/rabbit_capture_plan/readme.md b/keyboards/kakunpc/rabbit_capture_plan/readme.md new file mode 100644 index 0000000000..fa80367a12 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/readme.md @@ -0,0 +1,19 @@ +# rabbit_capture_plan + +![rabbit_capture_plan](https://i.gyazo.com/eb25048b17906f897253e8be18db001c.jpg) + +This is 70 keys split keyboard with trackball. + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: rabbit capture plan pcb +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/rabbit_capture_plan:default + +Flashing example for this keyboard: + + make kakunpc/rabbit_capture_plan:default:flash + +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/kakunpc/rabbit_capture_plan/rules.mk b/keyboards/kakunpc/rabbit_capture_plan/rules.mk new file mode 100644 index 0000000000..d6f3529e10 --- /dev/null +++ b/keyboards/kakunpc/rabbit_capture_plan/rules.mk @@ -0,0 +1,20 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # 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 +SPLIT_KEYBOARD = yes +OLED_ENABLE = no diff --git a/keyboards/kakunpc/suihankey/alpha/alpha.c b/keyboards/kakunpc/suihankey/alpha/alpha.c new file mode 100644 index 0000000000..1c2936e157 --- /dev/null +++ b/keyboards/kakunpc/suihankey/alpha/alpha.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "alpha.h" diff --git a/keyboards/kakunpc/suihankey/alpha/alpha.h b/keyboards/kakunpc/suihankey/alpha/alpha.h new file mode 100644 index 0000000000..02bba47104 --- /dev/null +++ b/keyboards/kakunpc/suihankey/alpha/alpha.h @@ -0,0 +1,39 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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 Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, \ + L10, L11, L12, L13, L14, \ + L20, L21, L22, L23, L24, \ + L30, L31, L32 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32 }, \ +} diff --git a/keyboards/kakunpc/suihankey/alpha/config.h b/keyboards/kakunpc/suihankey/alpha/config.h new file mode 100644 index 0000000000..b11478adfc --- /dev/null +++ b/keyboards/kakunpc/suihankey/alpha/config.h @@ -0,0 +1,143 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT Suihankey + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 5 + +/* + * 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, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define UNUSED_PINS +// #define USE_I2C +// #undef USE_SERIAL + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#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 + +/* 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 + +// #define RGBLED_SPLIT {18,18} diff --git a/keyboards/kakunpc/suihankey/alpha/info.json b/keyboards/kakunpc/suihankey/alpha/info.json new file mode 100644 index 0000000000..70029e17c9 --- /dev/null +++ b/keyboards/kakunpc/suihankey/alpha/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "suihankey", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85} + ] + } + } +} diff --git a/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c b/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c new file mode 100644 index 0000000000..b682f0f15d --- /dev/null +++ b/keyboards/kakunpc/suihankey/alpha/keymaps/default/keymap.c @@ -0,0 +1,86 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE, + COMMAND, + NUMBER, + FUNCTION +}; + +#define KC_CMD_SP LT(COMMAND,KC_SPC) +#define KC_CMD_ET LT(COMMAND,KC_ENTER) +#define KC_NUM_ALT LT(NUMBER,KC_LALT) +#define KC_NUM_BS LT(NUMBER,KC_BSPC) +#define KC_SET_CTRL LT(FUNCTION,KC_LCTRL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_A, KC_S, KC_D, KC_F, KC_G, + KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP + ), + [COMMAND] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_A, KC_S, KC_D, KC_F, KC_G, + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), + KC_NO, KC_NO, KC_NO + ), + [NUMBER] = LAYOUT( /* Base */ + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO + ), + [FUNCTION] = LAYOUT( /* Base */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_RMOD, + KC_NO, KC_NO, KC_NO + ), +}; + +#ifdef OLED_ENABLE +bool oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMAND\n"), false); + break; + case NUMBER: + oled_write_P(PSTR("NUMBER\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("FUNCTION\n"), false); + break; + default: + // Or use the write_ln shortcut over adding 'n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + + return false; +} +#endif diff --git a/keyboards/kakunpc/suihankey/alpha/keymaps/default/readme.md b/keyboards/kakunpc/suihankey/alpha/keymaps/default/readme.md new file mode 100644 index 0000000000..95eac805a0 --- /dev/null +++ b/keyboards/kakunpc/suihankey/alpha/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for suihankey
\ No newline at end of file diff --git a/keyboards/kakunpc/suihankey/alpha/readme.md b/keyboards/kakunpc/suihankey/alpha/readme.md new file mode 100644 index 0000000000..fcba60ff1d --- /dev/null +++ b/keyboards/kakunpc/suihankey/alpha/readme.md @@ -0,0 +1,18 @@ +# suihankey_alpha + +![suihankey_alpha](https://i.gyazo.com/07b9e882fd0c0ad00c8c98d93e94e383.jpg) + +Compact with only 18 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankey_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make suihankey/alpha: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/kakunpc/suihankey/alpha/rules.mk b/keyboards/kakunpc/suihankey/alpha/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/kakunpc/suihankey/alpha/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/kakunpc/suihankey/readme.md b/keyboards/kakunpc/suihankey/readme.md new file mode 100644 index 0000000000..e8099dbca4 --- /dev/null +++ b/keyboards/kakunpc/suihankey/readme.md @@ -0,0 +1,18 @@ +# suihankey + +![suihankey](https://i.gyazo.com/f798c5967f2ac457dd520ab8ff83b6ac.jpg) + +Compact with only 36 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankeyboard_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/suihankey/rev1: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/kakunpc/suihankey/rev1/config.h b/keyboards/kakunpc/suihankey/rev1/config.h new file mode 100644 index 0000000000..b2801cd862 --- /dev/null +++ b/keyboards/kakunpc/suihankey/rev1/config.h @@ -0,0 +1,143 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT Suihankey + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * 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 { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define UNUSED_PINS +//#define USE_I2C +//#undef USE_SERIAL + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#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 + +/* 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 + +// #define RGBLED_SPLIT {18,18} diff --git a/keyboards/kakunpc/suihankey/rev1/info.json b/keyboards/kakunpc/suihankey/rev1/info.json new file mode 100644 index 0000000000..70029e17c9 --- /dev/null +++ b/keyboards/kakunpc/suihankey/rev1/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "suihankey", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT": { + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85} + ] + } + } +} diff --git a/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c b/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c new file mode 100644 index 0000000000..b682f0f15d --- /dev/null +++ b/keyboards/kakunpc/suihankey/rev1/keymaps/default/keymap.c @@ -0,0 +1,86 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE, + COMMAND, + NUMBER, + FUNCTION +}; + +#define KC_CMD_SP LT(COMMAND,KC_SPC) +#define KC_CMD_ET LT(COMMAND,KC_ENTER) +#define KC_NUM_ALT LT(NUMBER,KC_LALT) +#define KC_NUM_BS LT(NUMBER,KC_BSPC) +#define KC_SET_CTRL LT(FUNCTION,KC_LCTRL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_A, KC_S, KC_D, KC_F, KC_G, + KC_Z, KC_X, KC_C, KC_V, KC_B, + KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP + ), + [COMMAND] = LAYOUT( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_A, KC_S, KC_D, KC_F, KC_G, + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), + KC_NO, KC_NO, KC_NO + ), + [NUMBER] = LAYOUT( /* Base */ + KC_1, KC_2, KC_3, KC_4, KC_5, + KC_6, KC_7, KC_8, KC_9, KC_0, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO + ), + [FUNCTION] = LAYOUT( /* Base */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_RMOD, + KC_NO, KC_NO, KC_NO + ), +}; + +#ifdef OLED_ENABLE +bool oled_task_user(void) { + oled_write_P(PSTR("Layer: "), false); + switch (biton32(layer_state)) { + case BASE: + oled_write_P(PSTR("Default\n"), false); + break; + case COMMAND: + oled_write_P(PSTR("COMMAND\n"), false); + break; + case NUMBER: + oled_write_P(PSTR("NUMBER\n"), false); + break; + case FUNCTION: + oled_write_P(PSTR("FUNCTION\n"), false); + break; + default: + // Or use the write_ln shortcut over adding 'n' to the end of your string + oled_write_ln_P(PSTR("Undefined"), false); + } + + // Host Keyboard LED Status + oled_write_P(IS_HOST_LED_ON(USB_LED_NUM_LOCK) ? PSTR("NUMLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_CAPS_LOCK) ? PSTR("CAPLCK ") : PSTR(" "), false); + oled_write_P(IS_HOST_LED_ON(USB_LED_SCROLL_LOCK) ? PSTR("SCRLCK ") : PSTR(" "), false); + + return false; +} +#endif diff --git a/keyboards/kakunpc/suihankey/rev1/keymaps/default/readme.md b/keyboards/kakunpc/suihankey/rev1/keymaps/default/readme.md new file mode 100644 index 0000000000..95eac805a0 --- /dev/null +++ b/keyboards/kakunpc/suihankey/rev1/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for suihankey
\ No newline at end of file diff --git a/keyboards/kakunpc/suihankey/rev1/readme.md b/keyboards/kakunpc/suihankey/rev1/readme.md new file mode 100644 index 0000000000..1c80a8af63 --- /dev/null +++ b/keyboards/kakunpc/suihankey/rev1/readme.md @@ -0,0 +1,18 @@ +# suihankey_rev1 + +![suihankey_rev1](https://i.gyazo.com/07b9e882fd0c0ad00c8c98d93e94e383.jpg) + +Compact with only 18 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankey_rev1, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make suihankey/rev1: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/kakunpc/suihankey/rev1/rev1.c b/keyboards/kakunpc/suihankey/rev1/rev1.c new file mode 100644 index 0000000000..40ff30e620 --- /dev/null +++ b/keyboards/kakunpc/suihankey/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "rev1.h" diff --git a/keyboards/kakunpc/suihankey/rev1/rev1.h b/keyboards/kakunpc/suihankey/rev1/rev1.h new file mode 100644 index 0000000000..cbc877abd5 --- /dev/null +++ b/keyboards/kakunpc/suihankey/rev1/rev1.h @@ -0,0 +1,40 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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 Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + L00, L01, L02, L03, L04, \ + L10, L11, L12, L13, L14, \ + L20, L21, L22, L23, L24, \ + L30, L31, L32 \ +) \ +{ \ + { L00, L10, L20, L30 }, \ + { L01, L11, L21, L31 }, \ + { L02, L12, L22, L32 }, \ + { L03, L13, L23, KC_NO }, \ + { L04, L14, L24, KC_NO }, \ +} diff --git a/keyboards/kakunpc/suihankey/rev1/rules.mk b/keyboards/kakunpc/suihankey/rev1/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/kakunpc/suihankey/rev1/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/kakunpc/suihankey/rules.mk b/keyboards/kakunpc/suihankey/rules.mk new file mode 100644 index 0000000000..332c7d7355 --- /dev/null +++ b/keyboards/kakunpc/suihankey/rules.mk @@ -0,0 +1,23 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # 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 +OLED_ENABLE = yes +OLED_DRIVER = SSD1306 +SPLIT_KEYBOARD = no + +DEFAULT_FOLDER = kakunpc/suihankey/rev1 diff --git a/keyboards/kakunpc/suihankey/split/.noci b/keyboards/kakunpc/suihankey/split/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/.noci diff --git a/keyboards/kakunpc/suihankey/split/alpha/.noci b/keyboards/kakunpc/suihankey/split/alpha/.noci new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/alpha/.noci diff --git a/keyboards/kakunpc/suihankey/split/alpha/alpha.c b/keyboards/kakunpc/suihankey/split/alpha/alpha.c new file mode 100644 index 0000000000..1c2936e157 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/alpha/alpha.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "alpha.h" diff --git a/keyboards/kakunpc/suihankey/split/alpha/alpha.h b/keyboards/kakunpc/suihankey/split/alpha/alpha.h new file mode 100644 index 0000000000..ba93405ecc --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/alpha/alpha.h @@ -0,0 +1,45 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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 Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_split_3x5_3( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L31, L32, R32, R31, R30 \ +) \ +{ \ + { L00, L01, L02, L03, L04 }, \ + { L10, L11, L12, L13, L14 }, \ + { L20, L21, L22, L23, L24 }, \ + { L30, L31, L32 }, \ + { R00, R01, R02, R03, R04 }, \ + { R10, R11, R12, R13, R14 }, \ + { R20, R21, R22, R23, R24 }, \ + { R30, R31, R32 }, \ +} + +#define LAYOUT LAYOUT_split_3x5_3 diff --git a/keyboards/kakunpc/suihankey/split/alpha/config.h b/keyboards/kakunpc/suihankey/split/alpha/config.h new file mode 100644 index 0000000000..ae5acdbd4b --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/alpha/config.h @@ -0,0 +1,143 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT Suihankey + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 5 + +/* + * 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, F5, F6, F7 } +#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } +#define UNUSED_PINS +#define USE_I2C +#undef USE_SERIAL + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#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 + +/* 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 + +// #define RGBLED_SPLIT {18,18} diff --git a/keyboards/kakunpc/suihankey/split/alpha/readme.md b/keyboards/kakunpc/suihankey/split/alpha/readme.md new file mode 100644 index 0000000000..4a26a34b97 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/alpha/readme.md @@ -0,0 +1,18 @@ +# suihankey_alpha + +![suihankey_alpha](https://i.gyazo.com/f798c5967f2ac457dd520ab8ff83b6ac.jpg) + +Compact with only 36 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankey_alphaboard_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/suihankey/alpha: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/kakunpc/suihankey/split/alpha/rules.mk b/keyboards/kakunpc/suihankey/split/alpha/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/alpha/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/kakunpc/suihankey/split/info.json b/keyboards/kakunpc/suihankey/split/info.json new file mode 100644 index 0000000000..2f40949f6b --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/info.json @@ -0,0 +1,54 @@ +{ + "keyboard_name": "suihankey_split", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT_split_3x5_3": { + "layout": [ + {"x": 0, "y": 0.375}, + {"x": 1, "y": 0.125}, + {"x": 2, "y": 0}, + {"x": 3, "y": 0.125}, + {"x": 4, "y": 0.25}, + + {"x": 8.2, "y": 0.25}, + {"x": 9.2, "y": 0.125}, + {"x": 10.2, "y": 0}, + {"x": 11.2, "y": 0.125}, + {"x": 12.2, "y": 0.375}, + + {"x": 0, "y": 1.375}, + {"x": 1, "y": 1.125}, + {"x": 2, "y": 1}, + {"x": 3, "y": 1.125}, + {"x": 4, "y": 1.25}, + + {"x": 8.2, "y": 1.25}, + {"x": 9.2, "y": 1.125}, + {"x": 10.2, "y": 1}, + {"x": 11.2, "y": 1.125}, + {"x": 12.2, "y": 1.375}, + + {"x": 0, "y": 2.375}, + {"x": 1, "y": 2.125}, + {"x": 2, "y": 2}, + {"x": 3, "y": 2.125}, + {"x": 4, "y": 2.25}, + + {"x": 8.2, "y": 2.25}, + {"x": 9.2, "y": 2.125}, + {"x": 10.2, "y": 2}, + {"x": 11.2, "y": 2.125}, + {"x": 12.2, "y": 2.375}, + + {"x": 3.4, "y": 3.25}, + {"x": 4.4, "y": 3.55}, + {"x": 5.4, "y": 3.85}, + + {"x": 6.8, "y": 3.85}, + {"x": 7.8, "y": 3.55}, + {"x": 8.8, "y": 3.25} + ] + } + } +} diff --git a/keyboards/kakunpc/suihankey/split/keymaps/default/keymap.c b/keyboards/kakunpc/suihankey/split/keymaps/default/keymap.c new file mode 100644 index 0000000000..a48072d9f2 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/keymaps/default/keymap.c @@ -0,0 +1,56 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum layers{ + BASE, + COMMAND, + NUMBER, + SETTING +}; + +#define KC_CMD_SP LT(COMMAND,KC_SPC) +#define KC_CMD_ET LT(COMMAND,KC_ENTER) +#define KC_NUM_ALT LT(NUMBER,KC_LALT) +#define KC_NUM_BS LT(NUMBER,KC_BSPC) +#define KC_SET_CTRL LT(SETTING,KC_LCTRL) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_split_3x5_3( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, + KC_SET_CTRL, KC_NUM_ALT, KC_CMD_SP, KC_CMD_ET, KC_BSPC, KC_LSFT + ), + [COMMAND] = LAYOUT_split_3x5_3( /* Base */ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), LCTL(KC_B), KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), + [NUMBER] = LAYOUT_split_3x5_3( /* Base */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_P7, KC_P8, KC_P9, KC_NO, KC_NO, + KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_P4, KC_P5, KC_P6, KC_NO, KC_NO, + KC_F11, KC_F12, KC_NO, KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_P0, KC_PDOT, KC_NO + ), + [SETTING] = LAYOUT_split_3x5_3( /* Base */ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO + ), +}; diff --git a/keyboards/kakunpc/suihankey/split/keymaps/default/readme.md b/keyboards/kakunpc/suihankey/split/keymaps/default/readme.md new file mode 100644 index 0000000000..43ede89526 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default split keymap for suihankey diff --git a/keyboards/kakunpc/suihankey/split/readme.md b/keyboards/kakunpc/suihankey/split/readme.md new file mode 100644 index 0000000000..ed2058290b --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/readme.md @@ -0,0 +1,18 @@ +# suihankey split + +![suihankey](https://i.gyazo.com/f798c5967f2ac457dd520ab8ff83b6ac.jpg) + +Compact with only 36 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankeyboard_alpha, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/suihankey/split: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/kakunpc/suihankey/split/rev1/config.h b/keyboards/kakunpc/suihankey/split/rev1/config.h new file mode 100644 index 0000000000..6b7dd2bac9 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/rev1/config.h @@ -0,0 +1,143 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT Suihankey + +/* key matrix size */ +#define MATRIX_ROWS 10 +#define MATRIX_COLS 4 + +/* + * 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 { D4, C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F4, F5, F6, F7 } +#define UNUSED_PINS +#define USE_I2C +#undef USE_SERIAL + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 +#define SPLIT_HAND_PIN D2 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 18 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#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 + +/* 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 + +// #define RGBLED_SPLIT {18,18} diff --git a/keyboards/kakunpc/suihankey/split/rev1/readme.md b/keyboards/kakunpc/suihankey/split/rev1/readme.md new file mode 100644 index 0000000000..a4e60fe1b9 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/rev1/readme.md @@ -0,0 +1,18 @@ +# suihankey_rev1 + +![suihankey_rev1](https://i.gyazo.com/f798c5967f2ac457dd520ab8ff83b6ac.jpg) + +Compact with only 36 keys is a concept keyboard. +Supports OLED and RGBLED (optional) + + + +Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +Hardware Supported: suihankey_rev1board_rev1, promicro +Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/suihankey/rev1: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/kakunpc/suihankey/split/rev1/rev1.c b/keyboards/kakunpc/suihankey/split/rev1/rev1.c new file mode 100644 index 0000000000..40ff30e620 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/rev1/rev1.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "rev1.h" diff --git a/keyboards/kakunpc/suihankey/split/rev1/rev1.h b/keyboards/kakunpc/suihankey/split/rev1/rev1.h new file mode 100644 index 0000000000..98618ba712 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/rev1/rev1.h @@ -0,0 +1,47 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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 Leys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_split_3x5_3( \ + L00, L01, L02, L03, L04, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, R24, R23, R22, R21, R20, \ + L30, L31, L32, R32, R31, R30 \ +) \ +{ \ + { L00, L10, L20, L30 }, \ + { L01, L11, L21, L31 }, \ + { L02, L12, L22, L32 }, \ + { L03, L13, L23, KC_NO }, \ + { L04, L14, L24, KC_NO }, \ + { R00, R10, R20, R30 }, \ + { R01, R11, R21, R31 }, \ + { R02, R12, R22, R32 }, \ + { R03, R13, R23, KC_NO }, \ + { R04, R14, R24, KC_NO }, \ +} + +#define LAYOUT LAYOUT_split_3x5_3 diff --git a/keyboards/kakunpc/suihankey/split/rev1/rules.mk b/keyboards/kakunpc/suihankey/split/rev1/rules.mk new file mode 100644 index 0000000000..d3661099d0 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/rev1/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +LAYOUTS = split_3x5_3 diff --git a/keyboards/kakunpc/suihankey/split/rules.mk b/keyboards/kakunpc/suihankey/split/rules.mk new file mode 100644 index 0000000000..6da41b20b8 --- /dev/null +++ b/keyboards/kakunpc/suihankey/split/rules.mk @@ -0,0 +1,4 @@ +OLED_ENABLE = no +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = kakunpc/suihankey/split/rev1 diff --git a/keyboards/kakunpc/thedogkeyboard/config.h b/keyboards/kakunpc/thedogkeyboard/config.h new file mode 100644 index 0000000000..099c157cff --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/config.h @@ -0,0 +1,141 @@ +/* +Copyright 2019 kakunpc + +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 <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER kakunpc +#define PRODUCT thedogkeyboard + +/* key matrix size */ +#define MATRIX_ROWS 20 +#define MATRIX_COLS 6 + +/* + * 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, F5, F6, F7, B1, B3, B2, B6, B4, B5 } +#define MATRIX_COL_PINS { D1, D0, D4, C6, D7, E6 } +#define UNUSED_PINS + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 111 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 50 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// /*== customize breathing effect ==*/ +// /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ +// #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 +// /*==== use exp() and sin() ====*/ +// #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 +// #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 +#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 + +/* 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/kakunpc/thedogkeyboard/info.json b/keyboards/kakunpc/thedogkeyboard/info.json new file mode 100644 index 0000000000..df6cc6ffdc --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/info.json @@ -0,0 +1,10 @@ +{ + "keyboard_name": "TheDogKeyboard", + "url": "https://kakunpc.booth.pm/", + "maintainer": "kakunpc", + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"1", "x":0, "y":0}, {"label":"7", "x":2, "y":0}, {"label":"13", "x":3, "y":0}, {"label":"19", "x":4, "y":0}, {"label":"24", "x":5, "y":0}, {"label":"29", "x":6.5, "y":0}, {"label":"35", "x":7.5, "y":0}, {"label":"40", "x":8.5, "y":0}, {"label":"45", "x":9.5, "y":0}, {"label":"50", "x":11, "y":0}, {"label":"56", "x":12, "y":0}, {"label":"62", "x":13, "y":0}, {"label":"66", "x":14, "y":0}, {"label":"70", "x":15.25, "y":0}, {"label":"76", "x":16.25, "y":0}, {"label":"82", "x":17.25, "y":0}, {"label":"2", "x":0, "y":1.5}, {"label":"8", "x":1, "y":1.5}, {"label":"14", "x":2, "y":1.5}, {"label":"20", "x":3, "y":1.5}, {"label":"25", "x":4, "y":1.5}, {"label":"30", "x":5, "y":1.5}, {"label":"36", "x":6, "y":1.5}, {"label":"41", "x":7, "y":1.5}, {"label":"46", "x":8, "y":1.5}, {"label":"51", "x":9, "y":1.5}, {"label":"57", "x":10, "y":1.5}, {"label":"63", "x":11, "y":1.5}, {"label":"67", "x":12, "y":1.5}, {"label":"71", "x":13, "y":1.5, "w":2}, {"label":"77", "x":15.25, "y":1.5}, {"label":"84", "x":16.25, "y":1.5}, {"label":"83", "x":17.25, "y":1.5}, {"label":"88", "x":18.5, "y":1.5}, {"label":"93", "x":19.5, "y":1.5}, {"label":"97", "x":20.5, "y":1.5}, {"label":"102", "x":21.5, "y":1.5}, {"label":"3", "x":0, "y":2.5, "w":1.5}, {"label":"9", "x":1.5, "y":2.5}, {"label":"15", "x":2.5, "y":2.5}, {"label":"21", "x":3.5, "y":2.5}, {"label":"26", "x":4.5, "y":2.5}, {"label":"31", "x":5.5, "y":2.5}, {"label":"37", "x":6.5, "y":2.5}, {"label":"42", "x":7.5, "y":2.5}, {"label":"47", "x":8.5, "y":2.5}, {"label":"52", "x":9.5, "y":2.5}, {"label":"58", "x":10.5, "y":2.5}, {"label":"64", "x":11.5, "y":2.5}, {"label":"68", "x":12.5, "y":2.5}, {"label":"72", "x":13.5, "y":2.5, "w":1.5}, {"label":"78", "x":15.25, "y":2.5}, {"label":"86", "x":16.25, "y":2.5}, {"label":"85", "x":17.25, "y":2.5}, {"label":"89", "x":18.5, "y":2.5}, {"label":"94", "x":19.5, "y":2.5}, {"label":"98", "x":20.5, "y":2.5}, {"label":"103", "x":21.5, "y":2.5}, {"label":"4", "x":0, "y":3.5, "w":1.75}, {"label":"10", "x":1.75, "y":3.5}, {"label":"16", "x":2.75, "y":3.5}, {"label":"22", "x":3.75, "y":3.5}, {"label":"27", "x":4.75, "y":3.5}, {"label":"32", "x":5.75, "y":3.5}, {"label":"38", "x":6.75, "y":3.5}, {"label":"43", "x":7.75, "y":3.5}, {"label":"48", "x":8.75, "y":3.5}, {"label":"53", "x":9.75, "y":3.5}, {"label":"59", "x":10.75, "y":3.5}, {"label":"65", "x":11.75, "y":3.5}, {"label":"73", "x":12.75, "y":3.5, "w":2.25}, {"label":"90", "x":18.5, "y":3.5}, {"label":"95", "x":19.5, "y":3.5}, {"label":"99", "x":20.5, "y":3.5}, {"label":"110", "x":21.5, "y":3.5}, {"label":"5", "x":0, "y":4.5, "w":2.25}, {"label":"11", "x":2.25, "y":4.5}, {"label":"17", "x":3.25, "y":4.5}, {"label":"23", "x":4.25, "y":4.5}, {"label":"28", "x":5.25, "y":4.5}, {"label":"33", "x":6.25, "y":4.5}, {"label":"39", "x":7.25, "y":4.5}, {"label":"44", "x":8.25, "y":4.5}, {"label":"49", "x":9.25, "y":4.5}, {"label":"54", "x":10.25, "y":4.5}, {"label":"60", "x":11.25, "y":4.5}, {"label":"74", "x":12.25, "y":4.5, "w":2.75}, {"label":"87", "x":16.25, "y":4.5}, {"label":"91", "x":18.5, "y":4.5}, {"label":"96", "x":19.5, "y":4.5}, {"label":"100", "x":20.5, "y":4.5}, {"label":"104", "x":21.5, "y":4.5}, {"label":"6", "x":0, "y":5.5, "w":1.25}, {"label":"12", "x":1.25, "y":5.5, "w":1.25}, {"label":"18", "x":2.5, "y":5.5, "w":1.25}, {"label":"105", "x":3.75, "y":5.5, "w":1.25}, {"label":"106", "x":5, "y":5.5, "w":1.25}, {"label":"34", "x":6.25, "y":5.5, "w":1.25}, {"label":"107", "x":7.5, "y":5.5, "w":1.25}, {"label":"108", "x":8.75, "y":5.5, "w":1.25}, {"label":"55", "x":10, "y":5.5, "w":1.25}, {"label":"61", "x":11.25, "y":5.5, "w":1.25}, {"label":"69", "x":12.5, "y":5.5, "w":1.25}, {"label":"75", "x":13.75, "y":5.5, "w":1.25}, {"label":"79", "x":15.25, "y":5.5}, {"label":"80", "x":16.25, "y":5.5}, {"label":"81", "x":17.25, "y":5.5}, {"label":"92", "x":18.5, "y":5.5}, {"label":"109", "x":19.5, "y":5.5}, {"label":"101", "x":20.5, "y":5.5}, {"label":"111", "x":21.5, "y":5.5}] + } + } +} diff --git a/keyboards/kakunpc/thedogkeyboard/keymaps/default/keymap.c b/keyboards/kakunpc/thedogkeyboard/keymaps/default/keymap.c new file mode 100644 index 0000000000..7632f81b93 --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/keymaps/default/keymap.c @@ -0,0 +1,28 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_all( /* Base */ + KC_ESC, KC_F1,KC_F2,KC_F3,KC_F4, KC_F5,KC_F6,KC_F7,KC_F8, KC_F9,KC_F10,KC_F11,KC_F12, KC_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + KC_GRV,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCAP, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT ,KC_ENT, KC_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,KC_NO,KC_NO,KC_SPC,KC_NO,KC_NO,KC_RALT,KC_RGUI,KC_SPC,KC_RCTL, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO + ) +}; diff --git a/keyboards/kakunpc/thedogkeyboard/keymaps/default/readme.md b/keyboards/kakunpc/thedogkeyboard/keymaps/default/readme.md new file mode 100644 index 0000000000..045729a7a5 --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for thedogkeyboard diff --git a/keyboards/kakunpc/thedogkeyboard/keymaps/kakunpc/keymap.c b/keyboards/kakunpc/thedogkeyboard/keymaps/kakunpc/keymap.c new file mode 100644 index 0000000000..cc3ba84d87 --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/keymaps/kakunpc/keymap.c @@ -0,0 +1,43 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +enum layers +{ + BASE = 0, + COMMAND +}; + +#define KC_COMMAND LT(COMMAND, KC_F13) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_all( /* BASE */ + KC_ESC, KC_F1,KC_F2,KC_F3,KC_F4, KC_F5,KC_F6,KC_F7,KC_F8, KC_F9,KC_F10,KC_F11,KC_F12, KC_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + KC_GRV,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCTL, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT ,KC_ENT, KC_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,KC_COMMAND,KC_SPC,KC_SPC,KC_SPC,KC_F14,KC_RALT,KC_NO,KC_NO,KC_COMMAND, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO ), + [COMMAND] = LAYOUT_all( /* COMMAND */ + KC_ESC, KC_F1,KC_F2,KC_F3,KC_F4, KC_F5,KC_F6,KC_F7,KC_F8, KC_F9,KC_F10,KC_F11,KC_F12, KC_PSCREEN,KC_SCROLLLOCK,KC_PAUSE, + + KC_GRV,KC_1,KC_2,KC_3,KC_4,KC_5,KC_6,KC_7,KC_8,KC_9,KC_0,KC_MINS,KC_EQL,KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_TAB,KC_Q,KC_W,KC_E,KC_R,KC_T,KC_Y,KC_U,KC_I,KC_O,KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_LCAP, KC_A,KC_S,KC_D,KC_F,KC_G,KC_H,KC_J,KC_K,KC_L,KC_SCLN,KC_QUOT ,KC_ENT, KC_P4, KC_P5, KC_P6, KC_NO, + KC_LSHIFT, KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLSH, KC_RSHIFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL,KC_LGUI,KC_LALT,_______,KC_SPC,KC_SPC,KC_SPC,KC_F14,KC_RALT,KC_NO,KC_NO,_______, KC_LEFT,KC_DOWN,KC_RIGHT, KC_P0, KC_NO, KC_PDOT, KC_NO ), +}; diff --git a/keyboards/kakunpc/thedogkeyboard/keymaps/kakunpc/readme.md b/keyboards/kakunpc/thedogkeyboard/keymaps/kakunpc/readme.md new file mode 100644 index 0000000000..66eab07b94 --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/keymaps/kakunpc/readme.md @@ -0,0 +1 @@ +# The kakunpc keymap for thedogkeyboard diff --git a/keyboards/kakunpc/thedogkeyboard/matrix.c b/keyboards/kakunpc/thedogkeyboard/matrix.c new file mode 100644 index 0000000000..2851859cf2 --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/matrix.c @@ -0,0 +1,280 @@ +/* +Copyright 2012-2018 Jun Wako, Jack Humbert, Yiancar + +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 <http://www.gnu.org/licenses/>. +*/ +#include <stdint.h> +#include <stdbool.h> +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "debounce.h" +#include "quantum.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +static const pin_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; +static const pin_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t raw_matrix[MATRIX_ROWS]; //raw values +static matrix_row_t matrix[MATRIX_ROWS]; //debounced values + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<<col)); +} + +inline +matrix_row_t matrix_get_row(uint8_t row) +{ + // Matrix mask lets you disable switches in the returned matrix data. For example, if you have a + // switch blocker installed and the switch is always pressed. +#ifdef MATRIX_MASKED + return matrix[row] & matrix_mask[row]; +#else + return matrix[row]; +#endif +} + +void matrix_print(void) +{ + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + print_hex8(row); print(": "); + print_matrix_row(row); + print("\n"); + } +} + +uint8_t matrix_key_count(void) +{ + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} + +static void select_row(uint8_t row) +{ + setPinOutput(row_pins[row]); + writePinLow(row_pins[row]); +} + +static void unselect_row(uint8_t row) +{ + setPinInputHigh(row_pins[row]); +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static void select_col(uint8_t col) +{ + setPinOutput(col_pins[col]); + writePinLow(col_pins[col]); +} + +static void unselect_col(uint8_t col) +{ + setPinInputHigh(col_pins[col]); +} + +static void unselect_cols(void) +{ + for(uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } +} + +static void init_pins(void) { + unselect_rows(); + unselect_cols(); + for (uint8_t x = 0; x < MATRIX_COLS; x++) { + setPinInputHigh(col_pins[x]); + } + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + setPinInputHigh(row_pins[x]); + } +} + +static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) +{ + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[current_row]; + + // Clear data in matrix row + current_matrix[current_row] = 0; + + // Select row and wait for row selecton to stabilize + select_row(current_row); + wait_us(30); + + // For each col... + for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { + + // Select the col pin to read (active low) + uint8_t pin_state = readPin(col_pins[col_index]); + + // Populate the matrix row with the state of the col pin + current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); + } + + // Unselect row + unselect_row(current_row); + + return (last_row_value != current_matrix[current_row]); +} + +static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) +{ + bool matrix_changed = false; + + // Select col and wait for col selecton to stabilize + select_col(current_col); + wait_us(30); + + // For each row... + for(uint8_t row_index = 0; row_index < MATRIX_ROWS/2; row_index++) + { + uint8_t tmp = row_index + MATRIX_ROWS/2; + // Store last value of row prior to reading + matrix_row_t last_row_value = current_matrix[tmp]; + + // Check row pin state + if (readPin(row_pins[row_index]) == 0) + { + // Pin LO, set col bit + current_matrix[tmp] |= (ROW_SHIFTER << current_col); + } + else + { + // Pin HI, clear col bit + current_matrix[tmp] &= ~(ROW_SHIFTER << current_col); + } + + // Determine if the matrix changed state + if ((last_row_value != current_matrix[tmp]) && !(matrix_changed)) + { + matrix_changed = true; + } + } + + // Unselect col + unselect_col(current_col); + + return matrix_changed; +} + +void matrix_init(void) { + + // initialize key pins + init_pins(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + raw_matrix[i] = 0; + matrix[i] = 0; + } + + debounce_init(MATRIX_ROWS); + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + bool changed = false; + + // Set row, read cols + for (uint8_t current_row = 0; current_row < MATRIX_ROWS / 2; current_row++) { + changed |= read_cols_on_row(raw_matrix, current_row); + } + //else + // Set col, read rows + for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { + changed |= read_rows_on_col(raw_matrix, current_col); + } + + debounce(raw_matrix, matrix, MATRIX_ROWS, changed); + + matrix_scan_quantum(); + return (uint8_t)changed; +} diff --git a/keyboards/kakunpc/thedogkeyboard/readme.md b/keyboards/kakunpc/thedogkeyboard/readme.md new file mode 100644 index 0000000000..c3f73c5303 --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/readme.md @@ -0,0 +1,15 @@ +# thedogkeyboard + +![thedogkeyboard](https://i.gyazo.com/70ac677c1e75c04b812e5dce311f7901.jpg) + +ProMicro 100% Keyboard. + +* Keyboard Maintainer: [kakunpc](https://github.com/kakunpc) +* Hardware Supported: thedogkeyboard_rev1, promicro +* Hardware Availability: booth([@kakunpc](https://kakunpc.booth.pm/)) + +Make example for this keyboard (after setting up your build environment): + + make kakunpc/thedogkeyboard: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/kakunpc/thedogkeyboard/rules.mk b/keyboards/kakunpc/thedogkeyboard/rules.mk new file mode 100644 index 0000000000..b91a3736ad --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/rules.mk @@ -0,0 +1,21 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# 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 = yes # Console for debug +COMMAND_ENABLE = yes # 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 +CUSTOM_MATRIX = yes + +SRC += matrix.c diff --git a/keyboards/kakunpc/thedogkeyboard/thedogkeyboard.c b/keyboards/kakunpc/thedogkeyboard/thedogkeyboard.c new file mode 100644 index 0000000000..a1808324c8 --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/thedogkeyboard.c @@ -0,0 +1,16 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#include "thedogkeyboard.h" diff --git a/keyboards/kakunpc/thedogkeyboard/thedogkeyboard.h b/keyboards/kakunpc/thedogkeyboard/thedogkeyboard.h new file mode 100644 index 0000000000..3f4b72c2be --- /dev/null +++ b/keyboards/kakunpc/thedogkeyboard/thedogkeyboard.h @@ -0,0 +1,59 @@ +/* Copyright 2019 kakunpc + * + * 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 <http://www.gnu.org/licenses/>. + */ +#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_all( \ + k01, k07,k13,k19,k24, k29,k35,k40,k45, k50,k56,k62,k66, k70,k76,k82,\ + \ + k02,k08,k14,k20,k25,k30,k36,k41,k46,k51,k57,k63,k67, k71, k77,k84,k83, k88,k93,k97,k102, \ + k03, k09,k15,k21,k26,k31,k37,k42,k47,k52,k58,k64,k68, k72, k78,k86,k85, k89,k94,k98,k103, \ + k04, k10,k16,k22,k27,k32,k38,k43,k48,k53,k59,k65, k73, k90,k95,k99,k110, \ + k05, k11,k17,k23,k28,k33,k39,k44,k49,k54,k60, k74, k87, k91,k96,k100,k104, \ + k06, k12, k18, k105, k106, k34, k107, k108, k55, k61, k69, k75, k79,k80,k81, k92,k109,k101,k111 \ + \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06 }, \ + { k07, k08, k09, k10, k11, k12 }, \ + { k13, k14, k15, k16, k17, k18 }, \ + { k19, k20, k21, k22, k23, k105 }, \ + { k24, k25, k26, k27, k28, k106 }, \ + { k29, k30, k31, k32, k33, k34 }, \ + { k35, k36, k37, k38, k39, k107 }, \ + { k40, k41, k42, k43, k44, k108 }, \ + { k45, k46, k47, k48, k49, KC_NO }, \ + { k50, k51, k52, k53, k54, k55 }, \ + { k56, k57, k58, k59, k60, k61 }, \ + { k62, k63, k64, k65, KC_NO, KC_NO }, \ + { k66, k67, k68, k69, KC_NO, KC_NO }, \ + { k70, k71, k72, k73, k74, k75 }, \ + { k76, k77, k78, k79, k80, k81 }, \ + { k82, k83, k84, k85, k86, k87 }, \ + { k88, k89, k90, k91, k92, KC_NO }, \ + { k93, k94, k95, k96, k109, KC_NO }, \ + { k97, k98, k99, k100, k101, KC_NO }, \ + { k102, k103, k104, k110, k111, KC_NO } \ +} |