diff --git a/keyboards/4pplet/waffling80/readme.md b/keyboards/4pplet/waffling80/readme.md index 3eb0745b3f..356990dd28 100644 --- a/keyboards/4pplet/waffling80/readme.md +++ b/keyboards/4pplet/waffling80/readme.md @@ -8,6 +8,8 @@ A TKL PCB attempting a87 compatibility with different switch and layout-options. Make example for this keyboard (after setting up your build environment): make 4pplet/waffling80/rev_a:default + make 4pplet/waffling80/rev_b:default + make 4pplet/waffling80/rev_b_ansi: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/4pplet/waffling80/rev_b_ansi/config.h b/keyboards/4pplet/waffling80/rev_b_ansi/config.h new file mode 100644 index 0000000000..036d08cc73 --- /dev/null +++ b/keyboards/4pplet/waffling80/rev_b_ansi/config.h @@ -0,0 +1,19 @@ +/* +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 + +#define WS2812_EXTERNAL_PULLUP diff --git a/keyboards/4pplet/waffling80/rev_b_ansi/info.json b/keyboards/4pplet/waffling80/rev_b_ansi/info.json new file mode 100644 index 0000000000..e678d0374d --- /dev/null +++ b/keyboards/4pplet/waffling80/rev_b_ansi/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "waffling80 Rev B ANSI HS", + "usb": { + "pid": "0x0017", + "device_version": "0.0.1" + }, + "rgblight": { + "saturation_steps": 8, + "brightness_steps": 8, + "led_count": 2 + }, + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true, + "nkro": true, + "rgblight": true + } + "ws2812": { + "pin": "A8" + }, + "matrix_pins": { + "cols": ["B2", "B1", "B0", "A7", "A6", "A3", "B9", "B8"], + "rows": ["B13", "B12", "A5", "A4", "A2", "A1", "F0", "C15", "C13", "C14", "F1", "A0"] + }, + "diode_direction": "COL2ROW", + "processor": "STM32F072", + "bootloader": "stm32-dfu" +} diff --git a/keyboards/4pplet/waffling80/rev_b_ansi/readme.md b/keyboards/4pplet/waffling80/rev_b_ansi/readme.md new file mode 100644 index 0000000000..f374f8c89b --- /dev/null +++ b/keyboards/4pplet/waffling80/rev_b_ansi/readme.md @@ -0,0 +1,18 @@ +# waffling80 + +A TKL PCB attempting a87 and a88 compatibility with different switch and layout-options. + +* Keyboard Maintainer: [4pplet](https://github.com/4pplet) +* Hardware Supported: [waffling80](https://github.com/4pplet/waffling80) + +Make example for this keyboard (after setting up your build environment): + + make 4pplet/waffling80/rev_b_ansi: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): +* Hold the reset-header for a few seconds on the 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 Esc key, 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/waffling80/rev_b_ansi/rev_b_ansi.c b/keyboards/4pplet/waffling80/rev_b_ansi/rev_b_ansi.c new file mode 100644 index 0000000000..9e617eaa7a --- /dev/null +++ b/keyboards/4pplet/waffling80/rev_b_ansi/rev_b_ansi.c @@ -0,0 +1,47 @@ +/* +Copyright 2024 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_b_ansi.h" + +bool led_update_kb(led_t led_state) { + bool res = led_update_user(led_state); + if (SCROLL_LOCK_ENABLE && res) { + if(led_state.scroll_lock) { + #ifdef SCROLL_LOCK_COLOR + rgblight_sethsv_at(SCROLL_LOCK_COLOR, 0); + #else + rgblight_sethsv_at(rgblight_get_hue(),rgblight_get_sat(),rgblight_get_val(), 0); + #endif + } + else { + rgblight_sethsv_at(HSV_OFF, 0); + } + } + if (CAPS_LOCK_ENABLE && res) { + if(led_state.caps_lock) { + #ifdef CAPS_LOCK_COLOR + rgblight_sethsv_at(CAPS_LOCK_COLOR, 1); + #else + rgblight_sethsv_at(rgblight_get_hue(),rgblight_get_sat(),rgblight_get_val(), 1); + #endif + } + else{ + rgblight_sethsv_at(HSV_OFF, 1); + } + } + return res; +} + diff --git a/keyboards/4pplet/waffling80/rev_b_ansi/rev_b_ansi.h b/keyboards/4pplet/waffling80/rev_b_ansi/rev_b_ansi.h new file mode 100644 index 0000000000..c8d4c8b971 --- /dev/null +++ b/keyboards/4pplet/waffling80/rev_b_ansi/rev_b_ansi.h @@ -0,0 +1,26 @@ +/* +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 + +#define CAPS_LOCK_ENABLE 1 +#define SCROLL_LOCK_ENABLE 1 + +// If colors are defined, they will be static. If not defined, color for incicators can be set in VIA. +//#define CAPS_LOCK_COLOR HSV_GREEN +//#define SCROLL_LOCK_COLOR HSV_GREEN + +#include "quantum.h" diff --git a/keyboards/4pplet/waffling80/rev_b_ansi/rules.mk b/keyboards/4pplet/waffling80/rev_b_ansi/rules.mk new file mode 100644 index 0000000000..04fe1eba2a --- /dev/null +++ b/keyboards/4pplet/waffling80/rev_b_ansi/rules.mk @@ -0,0 +1,2 @@ +# Wildcard to allow APM32 MCU +DFU_SUFFIX_ARGS = -p FFFF -v FFFF