From ea116b785bc85d7d7a6248589bbef731539f762c Mon Sep 17 00:00:00 2001 From: 4pplet Date: Sun, 6 Feb 2022 16:54:56 +0100 Subject: [Keyboard] Waffling60 Revision C (#16191) Co-authored-by: Drashna Jaelre Co-authored-by: 4pplet <4pplet@protonmail.com> Co-authored-by: 4pplet --- keyboards/4pplet/waffling60/rev_c/config.h | 64 +++++++++++++++++++++++++++++ keyboards/4pplet/waffling60/rev_c/readme.md | 20 +++++++++ keyboards/4pplet/waffling60/rev_c/rev_c.c | 31 ++++++++++++++ keyboards/4pplet/waffling60/rev_c/rev_c.h | 38 +++++++++++++++++ keyboards/4pplet/waffling60/rev_c/rules.mk | 18 ++++++++ 5 files changed, 171 insertions(+) create mode 100644 keyboards/4pplet/waffling60/rev_c/config.h create mode 100644 keyboards/4pplet/waffling60/rev_c/readme.md create mode 100644 keyboards/4pplet/waffling60/rev_c/rev_c.c create mode 100644 keyboards/4pplet/waffling60/rev_c/rev_c.h create mode 100644 keyboards/4pplet/waffling60/rev_c/rules.mk (limited to 'keyboards/4pplet/waffling60') diff --git a/keyboards/4pplet/waffling60/rev_c/config.h b/keyboards/4pplet/waffling60/rev_c/config.h new file mode 100644 index 0000000000..e1862f4c0e --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_c/config.h @@ -0,0 +1,64 @@ +/* +Copyright 2022 Stefan Sundin "4pplet" + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4444 +#define PRODUCT_ID 0x0008 +#define DEVICE_VER 0x0003 +#define MANUFACTURER 4pplet +#define PRODUCT waffling60 Rev C + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {C2,D0,B0,D6,D5} +#define MATRIX_COL_PINS {C4,C5,D2,C6,C7,B7,B6,B5,B4,B3,B2,B1,D1,D4} + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +#define QMK_ESC_OUTPUT C2 // usually COL +#define QMK_ESC_INPUT C4 // usually ROW + +#define RGB_DI_PIN D3 +#define RGBLED_NUM 1 +#define BACKLIGHT_LEVELS 5 + +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#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 +#define RGBLIGHT_EFFECT_TWINKLE diff --git a/keyboards/4pplet/waffling60/rev_c/readme.md b/keyboards/4pplet/waffling60/rev_c/readme.md new file mode 100644 index 0000000000..3b6b9c94f2 --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_c/readme.md @@ -0,0 +1,20 @@ +# waffling60 + +A 60% PCB for MX switches, one hot swap and one solder-pcb version with decent layout support. + +More info: https://geekhack.org/index.php?topic=103531.0 + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: [waffling60](https://github.com/4pplet/waffling60) + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/waffling60/rev_c: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). + +How to enter bootloader (DFU): +* Tap the physical reset button or short the reset-header (labled RESET) on tha back of the PCB for keyboard to enter DFU. When in DFU, it's ready to flash the firmware. + +Alternative option if the firmware is already pre-flashed: +* Unplug your keyboard, hold down the Spacebar and B at the same time, plug in your keyboard and wait a second before releasing the keys. The keyboard will enter DFU and is ready to flash the firmware. diff --git a/keyboards/4pplet/waffling60/rev_c/rev_c.c b/keyboards/4pplet/waffling60/rev_c/rev_c.c new file mode 100644 index 0000000000..f00cce06dc --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_c/rev_c.c @@ -0,0 +1,31 @@ +/* +Copyright 2022 Stefan Sundin "4pplet" + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "rev_c.h" + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (CAPS_LOCK_ENABLE && res) { + if (led_state.caps_lock){ + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv_noeeprom(CAPS_LOCK_COLOR); + } else { + rgblight_disable_noeeprom(); + } + } + return res; +} diff --git a/keyboards/4pplet/waffling60/rev_c/rev_c.h b/keyboards/4pplet/waffling60/rev_c/rev_c.h new file mode 100644 index 0000000000..3df9419eb9 --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_c/rev_c.h @@ -0,0 +1,38 @@ +/* +Copyright 2022 Stefan Sundin "4pplet" + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#pragma once + +// defines to set RGB-led behaviour. Off by default +#define CAPS_LOCK_ENABLE false +#define CAPS_LOCK_COLOR HSV_ORANGE + +#include "quantum.h" + +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k1d, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k2c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k41, k42, k44, k46, k48, k4a, k4b, k4c, k4d \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ + {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \ + {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ + {k40, k41, k42, KC_NO, k44, KC_NO, k46, KC_NO, k48, KC_NO, k4a, k4b, k4c, k4d}, \ +} diff --git a/keyboards/4pplet/waffling60/rev_c/rules.mk b/keyboards/4pplet/waffling60/rev_c/rules.mk new file mode 100644 index 0000000000..88173a40c2 --- /dev/null +++ b/keyboards/4pplet/waffling60/rev_c/rules.mk @@ -0,0 +1,18 @@ +# MCU name +MCU = atmega32u2 + +# 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 = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +AUDIO_ENABLE = no # Audio output -- cgit v1.2.3