From 6b87a573351db6d54eab29dbae451aaebbf1f140 Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Sat, 11 Feb 2023 13:23:21 -0800 Subject: [PATCH] WIP: ffkb integrated RP2040 v3 support --- bin/fp_build.sh | 10 +- keyboards/fingerpunch/ffkb/rp/config.h | 96 ++++++ .../ffkb/{rp2040/v3/halconf.h => rp/rp.c} | 13 +- keyboards/fingerpunch/ffkb/rp/rp.h | 26 ++ .../ffkb/{rp2040/v3 => rp}/rules.mk | 49 +-- .../ffkb/{rp2040 => rp}/v3/config.h | 64 +++- .../ffkb/{rp2040 => rp}/v3/fp_build.json | 24 +- keyboards/fingerpunch/ffkb/rp/v3/halconf.h | 13 + .../ffkb/{rp2040 => rp}/v3/info.json | 6 +- .../v3/keymaps/default/config.h | 0 .../v3/keymaps/default/keymap.c | 0 .../v3/keymaps/manna-harbour_miryoku/config.h | 0 .../v3/keymaps/manna-harbour_miryoku/keymap.c | 0 .../v3/keymaps/sadekbaroudi/keymap.c | 6 +- .../{rp2040 => rp}/v3/keymaps/via/keymap.c | 0 .../{rp2040 => rp}/v3/keymaps/via/rules.mk | 0 .../ffkb/{rp2040 => rp}/v3/kle-via.json | 0 keyboards/fingerpunch/ffkb/rp/v3/mcuconf.h | 21 ++ .../ffkb/{rp2040 => rp}/v3/readme.md | 20 +- keyboards/fingerpunch/ffkb/rp/v3/rules.mk | 38 +++ .../fingerpunch/ffkb/{rp2040 => rp}/v3/v3.c | 0 .../fingerpunch/ffkb/{rp2040 => rp}/v3/v3.h | 12 +- .../fingerpunch/ffkb/rp2040/v3/mcuconf.h | 25 -- keyboards/fingerpunch/ffkb/rp2040/v3/via.json | 322 ------------------ users/sadekbaroudi/process_records.c | 45 --- users/sadekbaroudi/process_records.h | 11 +- users/sadekbaroudi/template.c | 82 ----- users/sadekbaroudi/template.h | 15 - 28 files changed, 316 insertions(+), 582 deletions(-) create mode 100644 keyboards/fingerpunch/ffkb/rp/config.h rename keyboards/fingerpunch/ffkb/{rp2040/v3/halconf.h => rp/rp.c} (73%) create mode 100644 keyboards/fingerpunch/ffkb/rp/rp.h rename keyboards/fingerpunch/ffkb/{rp2040/v3 => rp}/rules.mk (63%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/config.h (50%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/fp_build.json (52%) create mode 100644 keyboards/fingerpunch/ffkb/rp/v3/halconf.h rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/info.json (56%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/keymaps/default/config.h (100%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/keymaps/default/keymap.c (100%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/keymaps/manna-harbour_miryoku/config.h (100%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/keymaps/manna-harbour_miryoku/keymap.c (100%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/keymaps/sadekbaroudi/keymap.c (96%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/keymaps/via/keymap.c (100%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/keymaps/via/rules.mk (100%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/kle-via.json (100%) create mode 100644 keyboards/fingerpunch/ffkb/rp/v3/mcuconf.h rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/readme.md (62%) create mode 100644 keyboards/fingerpunch/ffkb/rp/v3/rules.mk rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/v3.c (100%) rename keyboards/fingerpunch/ffkb/{rp2040 => rp}/v3/v3.h (81%) delete mode 100644 keyboards/fingerpunch/ffkb/rp2040/v3/mcuconf.h delete mode 100644 keyboards/fingerpunch/ffkb/rp2040/v3/via.json delete mode 100755 users/sadekbaroudi/template.c delete mode 100755 users/sadekbaroudi/template.h diff --git a/bin/fp_build.sh b/bin/fp_build.sh index ad9badb2ec..fc63cdfb00 100755 --- a/bin/fp_build.sh +++ b/bin/fp_build.sh @@ -58,13 +58,13 @@ get_valid_keyboards() { fi # now check for rp2040 version - if [[ -e "${line}/rp2040" ]]; then - echo $(get_valid_keyboards "${line}/rp2040" "false") + if [[ -e "${line}/rp" ]]; then + echo $(get_valid_keyboards "${line}/rp" "false") fi - # now check for stm32 version - if [[ -e "${line}/stm32" ]]; then - echo $(get_valid_keyboards "${line}/stm32" "false") + # now check for stm version + if [[ -e "${line}/stm" ]]; then + echo $(get_valid_keyboards "${line}/stm" "false") fi fi done diff --git a/keyboards/fingerpunch/ffkb/rp/config.h b/keyboards/fingerpunch/ffkb/rp/config.h new file mode 100644 index 0000000000..48c40bb371 --- /dev/null +++ b/keyboards/fingerpunch/ffkb/rp/config.h @@ -0,0 +1,96 @@ +/* +Copyright 2021 Sadek Baroudi + +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" + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +#define RGB_DI_PIN GP25 +#ifdef RGBLIGHT_ENABLE + // Use twinkle as the default rgb mode for the layers + #define DEFAULT_RGB_LAYER_MODE RGBLIGHT_MODE_TWINKLE+2 + #define RGBLED_NUM 42 + #define RGBLIGHT_HUE_STEP 16 + #define RGBLIGHT_SAT_STEP 16 + #define RGBLIGHT_VAL_STEP 16 + #define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level for RGBLIGHT_ENABLE */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ + #define RGBLIGHT_EFFECT_ALTERNATING + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_TWINKLE +#endif + +#ifdef RGB_MATRIX_ENABLE + #define RGB_MATRIX_LED_COUNT 42 + #define RGB_MATRIX_CENTER {100, 32} + #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 /* The maximum brightness level for RGB_MATRIX */ + #define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS // Sets the default brightness value, if none has been set + #define RGB_MATRIX_KEYPRESSES + #define RGB_MATRIX_FRAMEBUFFER_EFFECTS + #define RGB_MATRIX_KEYREACTIVE_ENABLED + #define ENABLE_RGB_MATRIX_ALPHAS_MODS + #define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN + #define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT + #define ENABLE_RGB_MATRIX_BREATHING + #define ENABLE_RGB_MATRIX_BAND_SAT + #define ENABLE_RGB_MATRIX_BAND_VAL + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT + #define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT + #define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL + #define ENABLE_RGB_MATRIX_CYCLE_ALL + #define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT + #define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN + #define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON + #define ENABLE_RGB_MATRIX_DUAL_BEACON + #define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL + #define ENABLE_RGB_MATRIX_CYCLE_SPIRAL + #define ENABLE_RGB_MATRIX_RAINBOW_BEACON + #define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS + #define ENABLE_RGB_MATRIX_RAINDROPS + #define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS + #define ENABLE_RGB_MATRIX_DIGITAL_RAIN + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS + #define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS + #define ENABLE_RGB_MATRIX_SPLASH + #define ENABLE_RGB_MATRIX_MULTISPLASH + #define ENABLE_RGB_MATRIX_SOLID_SPLASH + #define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH +#endif + +/* 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 + diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/halconf.h b/keyboards/fingerpunch/ffkb/rp/rp.c similarity index 73% rename from keyboards/fingerpunch/ffkb/rp2040/v3/halconf.h rename to keyboards/fingerpunch/ffkb/rp/rp.c index 482d3eba64..c908f9ea71 100644 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/halconf.h +++ b/keyboards/fingerpunch/ffkb/rp/rp.c @@ -1,5 +1,4 @@ -/* - * Copyright 2022 Charly Delay (@0xcharly) +/* Copyright 2021 Sadek Baroudi * * 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 @@ -14,12 +13,4 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ - -#pragma once - -#define HAL_USE_SERIAL TRUE -#define HAL_USE_SPI TRUE -#define SPI_USE_WAIT TRUE -#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD - -#include_next "halconf.h" +#include "rp.h" diff --git a/keyboards/fingerpunch/ffkb/rp/rp.h b/keyboards/fingerpunch/ffkb/rp/rp.h new file mode 100644 index 0000000000..974121dffc --- /dev/null +++ b/keyboards/fingerpunch/ffkb/rp/rp.h @@ -0,0 +1,26 @@ +/* Copyright 2022 Sadek Baroudi + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#pragma once + +#include "quantum.h" + +#if defined(KEYBOARD_fingerpunch_ffkb_rp_v3) +# include "v3.h" +#elif defined(KEYBOARD_fingerpunch_ffkb_rp_v4) +# include "v4.h" +#endif + +#include "keyboards/fingerpunch/fp.h" diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/rules.mk b/keyboards/fingerpunch/ffkb/rp/rules.mk similarity index 63% rename from keyboards/fingerpunch/ffkb/rp2040/v3/rules.mk rename to keyboards/fingerpunch/ffkb/rp/rules.mk index 770a3cdd41..f32f099ac9 100644 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/rules.mk +++ b/keyboards/fingerpunch/ffkb/rp/rules.mk @@ -1,15 +1,11 @@ # MCU name -MCU = atmega32u4 +MCU = RP2040 # Bootloader selection -# Teensy halfkay -# Pro Micro caterina -# Atmel DFU atmel-dfu -# LUFA DFU lufa-dfu -# QMK DFU qmk-dfu -# ATmega32A bootloadHID -# ATmega328P USBasp -BOOTLOADER = atmel-dfu +BOOTLOADER = rp2040 + +# LTO must be disabled for RP2040 builds +LTO_ENABLE = no # Build Options # change yes to no to disable @@ -43,27 +39,16 @@ SRC += keyboards/fingerpunch/fp_matrix_74hc595_spi.c QUANTUM_LIB_SRC += spi_master.c CUSTOM_MATRIX = lite -ifeq ($(strip $(CIRQUE_ENABLE)), yes) - MOUSEKEY_ENABLE := yes # not required, but enabling for mouse button keys - POINTING_DEVICE_ENABLE := yes - POINTING_DEVICE_DRIVER := cirque_pinnacle_i2c - OPT_DEFS += -DCIRQUE_ENABLE -endif +# PIO serial/WS2812 drivers must be used on RP2040 +SERIAL_DRIVER = vendor +WS2812_DRIVER = vendor -ifeq ($(strip $(FP_TRACKBALL_ENABLE)), yes) - MOUSEKEY_ENABLE := yes # not required, but enabling for mouse button keys - POINTING_DEVICE_ENABLE := yes - POINTING_DEVICE_DRIVER := pmw3360 - QUANTUM_LIB_SRC += spi_master.c - OPT_DEFS += -DFP_TRACKBALL_ENABLE -endif - -ifeq ($(strip $(FP_EC11)), yes) - ENCODER_ENABLE := yes - OPT_DEFS += -DFP_EC11_UNDER_PALMS -endif - -ifeq ($(strip $(FP_EVQ)), yes) - ENCODER_ENABLE := yes - OPT_DEFS += -DFP_EVQ_UNDER_PALMS -endif +DEFERRED_EXEC_ENABLE = yes +SRC += keyboards/fingerpunch/fp.c \ + keyboards/fingerpunch/fp_haptic.c \ + keyboards/fingerpunch/fp_audio.c \ + keyboards/fingerpunch/fp_keyhandler.c \ + keyboards/fingerpunch/fp_pointing.c \ + keyboards/fingerpunch/fp_rgb_common.c \ + keyboards/fingerpunch/fp_rgblight.c \ + keyboards/fingerpunch/fp_rgb_matrix.c diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/config.h b/keyboards/fingerpunch/ffkb/rp/v3/config.h similarity index 50% rename from keyboards/fingerpunch/ffkb/rp2040/v3/config.h rename to keyboards/fingerpunch/ffkb/rp/v3/config.h index 17c6453c60..eb8c7d0c86 100644 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/config.h +++ b/keyboards/fingerpunch/ffkb/rp/v3/config.h @@ -25,24 +25,21 @@ along with this program. If not, see . // SHIFT REGISTER // Only needed for matrix_74hc595_spi.c -#define SHIFTREG_MATRIX_COL_CS B6 +#define SHIFTREG_MATRIX_COL_CS GP21 #define SHIFTREG_DIVISOR 8 // needs to be the same as the PMW33XX_CS_DIVISOR below -#define MATRIX_ROW_PINS_SR { D2, F4, F5, F6, F7, D4 } +#define MATRIX_ROW_PINS_SR { GP29, GP28, GP27, GP0, GP1, GP4 } // SPI config for shift register (and trackball if enabled) -#define SPI_DRIVER SPID1 -#define SPI_SCK_PIN B1 -#define SPI_SCK_PAL_MODE 5 -#define SPI_MOSI_PIN B2 -#define SPI_MOSI_PAL_MODE 5 -#define SPI_MISO_PIN B3 -#define SPI_MISO_PAL_MODE 5 +#define SPI_DRIVER SPID0 +#define SPI_SCK_PIN GP22 +#define SPI_MOSI_PIN GP23 +#define SPI_MISO_PIN GP20 /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW -#define ENCODERS_PAD_A {C6, E6} -#define ENCODERS_PAD_B {D7, B4} +#define ENCODERS_PAD_A {GP26, GP7} +#define ENCODERS_PAD_B {GP24, GP8} #ifdef FP_EVQ @@ -54,6 +51,15 @@ along with this program. If not, see . #define ENCODERS_C_REVERSE #endif +#ifdef FP_INDICATOR_LEDS + // TODO: figure out the firmware logic for the indicator leds + #ifdef FP_PER_KEY_RGB + // What do I do if there are indicators with per key rgb + #else + // What do I do if there are indicators but not per key rgb + #endif +#endif + #define ENCODER_RESOLUTION 2 #ifdef CIRQUE_ENABLE @@ -69,9 +75,43 @@ along with this program. If not, see . #ifdef FP_TRACKBALL_ENABLE // Trackball config #define FP_POINTING_DEFAULT_DPI 800 - #define PMW33XX_CS_PIN B5 + #define PMW33XX_CS_PIN GP9 #define PMW33XX_CPI FP_POINTING_DEFAULT_DPI #define PMW33XX_CS_DIVISOR 8 // needs to be the same as the SHIFTREG_DIVISOR above #define POINTING_DEVICE_INVERT_Y #endif +#ifdef AUDIO_ENABLE + #define AUDIO_VOICES + #define AUDIO_PIN GP18 + #define AUDIO_PWM_DRIVER PWMD4 + #define AUDIO_PWM_CHANNEL RP2040_PWM_CHANNEL_B + #define AUDIO_STATE_TIMER GPTD4 + #define AUDIO_VOICES + // #define AUDIO_PWM_PAL_MODE 42 // only if using AUDIO_DRIVER = pwm_hardware + // #define NO_MUSIC_MODE + #define AUDIO_ENABLE_TONE_MULTIPLEXING + #define AUDIO_TONE_MULTIPLEXING_RATE_DEFAULT 10 + #define FP_AUDIO_MOUSE_BUTTONS + #define FP_AUDIO_CUT_COPY_PASTE + #define FP_AUDIO_SAVE + #define STARTUP_SONG SONG(STARTUP_SOUND) + #define DEFAULT_LAYER_SONGS \ + { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND) } +#endif + +#ifdef HAPTIC_ENABLE + #define FB_ERM_LRA 1 + #define FB_BRAKEFACTOR 3 // For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 + #define FB_LOOPGAIN 1 // For Low:0, Medium:1, High:2, Very High:3 + #define RATED_VOLTAGE 2 + #define V_PEAK 2.8 + #define V_RMS 2.0 + #define F_LRA 150 // resonance freq + #define DRV_GREETING alert_750ms + #define FP_HAPTIC_MOUSE_BUTTONS + #define FP_HAPTIC_CUT_COPY_PASTE + #define FP_HAPTIC_SAVE +#endif + + diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/fp_build.json b/keyboards/fingerpunch/ffkb/rp/v3/fp_build.json similarity index 52% rename from keyboards/fingerpunch/ffkb/rp2040/v3/fp_build.json rename to keyboards/fingerpunch/ffkb/rp/v3/fp_build.json index 375285fc11..aacf5f4147 100644 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/fp_build.json +++ b/keyboards/fingerpunch/ffkb/rp/v3/fp_build.json @@ -1,8 +1,4 @@ [ - { - "type" : "convert-to", - "name" : "stemcell" - }, { "type" : "single", "name" : "CIRQUE_ENABLE", @@ -18,9 +14,29 @@ "names" : [ "RGBLIGHT_ENABLE", "RGB_MATRIX_ENABLE" ], "user_input": "No RGB, RGB light, RGB matrix?" }, + { + "type" : "single", + "name" : "FP_PER_KEY_RGB", + "user_input": "Do you have per key RGB LEDs?" + }, + { + "type" : "single", + "name" : "FP_INDICATOR_LEDS", + "user_input": "Do you have the indicator LEDs?" + }, { "type" : "one-of", "names" : [ "FP_EC11", "FP_EVQ" ], "user_input": "No rotary encoders, EC11, or EVQ?" + }, + { + "type" : "single", + "name" : "AUDIO_ENABLE", + "user_input": "Do you have an audio buzzer?" + }, + { + "type" : "single", + "name" : "HAPTIC_ENABLE", + "user_input": "Do you have haptic feedback?" } ] diff --git a/keyboards/fingerpunch/ffkb/rp/v3/halconf.h b/keyboards/fingerpunch/ffkb/rp/v3/halconf.h new file mode 100644 index 0000000000..f188c301b7 --- /dev/null +++ b/keyboards/fingerpunch/ffkb/rp/v3/halconf.h @@ -0,0 +1,13 @@ +/* + * Copyright 2023 Sadek Baroudi (@sadekbaroudi) + */ + +#pragma once + +#define HAL_USE_I2C TRUE +#define HAL_USE_PWM TRUE +#define HAL_USE_PAL TRUE +// #define HAL_USE_SERIAL TRUE // not supported on rp2040, as it seems +#define HAL_USE_SPI TRUE + +#include_next diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/info.json b/keyboards/fingerpunch/ffkb/rp/v3/info.json similarity index 56% rename from keyboards/fingerpunch/ffkb/rp2040/v3/info.json rename to keyboards/fingerpunch/ffkb/rp/v3/info.json index 91c6cf0f75..c298c9a88e 100644 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/info.json +++ b/keyboards/fingerpunch/ffkb/rp/v3/info.json @@ -1,10 +1,10 @@ { "manufacturer": "sadekbaroudi", - "keyboard_name": "ffkb byomcu", - "url": "https://fingerpunch.xyz/product/faux-fox-keyboard-v3/", + "keyboard_name": "ffkb rp2040", + "url": "https://fingerpunch.xyz/product/faux-fox-keyboard-rp2040-v3/", "maintainer": "Sadek Baroudi ", "usb": { - "vid": "0xFEFE", + "vid": "0xFE2B", "pid": "0xFFBB", "device_version": "3.0.0" } diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/default/config.h b/keyboards/fingerpunch/ffkb/rp/v3/keymaps/default/config.h similarity index 100% rename from keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/default/config.h rename to keyboards/fingerpunch/ffkb/rp/v3/keymaps/default/config.h diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/default/keymap.c b/keyboards/fingerpunch/ffkb/rp/v3/keymaps/default/keymap.c similarity index 100% rename from keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/default/keymap.c rename to keyboards/fingerpunch/ffkb/rp/v3/keymaps/default/keymap.c diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/manna-harbour_miryoku/config.h b/keyboards/fingerpunch/ffkb/rp/v3/keymaps/manna-harbour_miryoku/config.h similarity index 100% rename from keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/manna-harbour_miryoku/config.h rename to keyboards/fingerpunch/ffkb/rp/v3/keymaps/manna-harbour_miryoku/config.h diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/manna-harbour_miryoku/keymap.c b/keyboards/fingerpunch/ffkb/rp/v3/keymaps/manna-harbour_miryoku/keymap.c similarity index 100% rename from keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/manna-harbour_miryoku/keymap.c rename to keyboards/fingerpunch/ffkb/rp/v3/keymaps/manna-harbour_miryoku/keymap.c diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/sadekbaroudi/keymap.c b/keyboards/fingerpunch/ffkb/rp/v3/keymaps/sadekbaroudi/keymap.c similarity index 96% rename from keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/sadekbaroudi/keymap.c rename to keyboards/fingerpunch/ffkb/rp/v3/keymaps/sadekbaroudi/keymap.c index a32c7d1c12..3fa760eb1a 100644 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/sadekbaroudi/keymap.c +++ b/keyboards/fingerpunch/ffkb/rp/v3/keymaps/sadekbaroudi/keymap.c @@ -40,18 +40,18 @@ ) /* Re-pass though to allow templates to be used */ -#define LAYOUT_ffkb_byomcu_base_wrapper(...) LAYOUT_ffkb_base(__VA_ARGS__) +#define LAYOUT_ffkb_base_wrapper(...) LAYOUT_ffkb_base(__VA_ARGS__) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_ALPHA_ALT] = LAYOUT_ffkb_byomcu_base_wrapper( + [_ALPHA_ALT] = LAYOUT_ffkb_base_wrapper( _________________ALPHA_ALT_L1_________________, _________________ALPHA_ALT_R1_________________, _________________ALPHA_ALT_L2_________________, _________________ALPHA_ALT_R2_________________, _________________ALPHA_ALT_L3_________________, _________________ALPHA_ALT_R3_________________, __ALPHA_ALT_THUMBS_6__ ), - [_ALPHA] = LAYOUT_ffkb_byomcu_base_wrapper( + [_ALPHA] = LAYOUT_ffkb_base_wrapper( __________________ALPHA_L1____________________, __________________ALPHA_R1____________________, __________________ALPHA_L2____________________, __________________ALPHA_R2____________________, __________________ALPHA_L3____________________, __________________ALPHA_R3____________________, diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/via/keymap.c b/keyboards/fingerpunch/ffkb/rp/v3/keymaps/via/keymap.c similarity index 100% rename from keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/via/keymap.c rename to keyboards/fingerpunch/ffkb/rp/v3/keymaps/via/keymap.c diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/via/rules.mk b/keyboards/fingerpunch/ffkb/rp/v3/keymaps/via/rules.mk similarity index 100% rename from keyboards/fingerpunch/ffkb/rp2040/v3/keymaps/via/rules.mk rename to keyboards/fingerpunch/ffkb/rp/v3/keymaps/via/rules.mk diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/kle-via.json b/keyboards/fingerpunch/ffkb/rp/v3/kle-via.json similarity index 100% rename from keyboards/fingerpunch/ffkb/rp2040/v3/kle-via.json rename to keyboards/fingerpunch/ffkb/rp/v3/kle-via.json diff --git a/keyboards/fingerpunch/ffkb/rp/v3/mcuconf.h b/keyboards/fingerpunch/ffkb/rp/v3/mcuconf.h new file mode 100644 index 0000000000..9893442158 --- /dev/null +++ b/keyboards/fingerpunch/ffkb/rp/v3/mcuconf.h @@ -0,0 +1,21 @@ +#pragma once + +#include_next + +#undef RP_I2C_USE_I2C1 +#define RP_I2C_USE_I2C1 TRUE + +#undef RP_PWM_USE_PWM4 +#define RP_PWM_USE_PWM4 TRUE + +#undef RP_PWM_USE_TIM1 +#define RP_PWM_USE_TIM1 TRUE + +#undef RP_SPI_USE_SPI0 +#define RP_SPI_USE_SPI0 TRUE + +// #undef RP_PWM_USE_PWM0 +// #define RP_PWM_USE_PWM0 TRUE + +// #undef RP_SIO_USE_UART0 +// #define RP_SIO_USE_UART0 TRUE diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/readme.md b/keyboards/fingerpunch/ffkb/rp/v3/readme.md similarity index 62% rename from keyboards/fingerpunch/ffkb/rp2040/v3/readme.md rename to keyboards/fingerpunch/ffkb/rp/v3/readme.md index e41f06b416..585b012e8f 100644 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/readme.md +++ b/keyboards/fingerpunch/ffkb/rp/v3/readme.md @@ -8,19 +8,21 @@ Faux fox keyboard (ffkb) Make example for this keyboard (after setting up your build environment): ``` - make fingerpunch/ffkb_byomcu:default RGBLIGHT_ENABLE=yes FP_EC11=yes CIRQUE_ENABLE=yes + make fingerpunch/ffkb/rp/v3:default RGBLIGHT_ENABLE=yes FP_EC11=yes CIRQUE_ENABLE=yes ``` -Don't forget to add ```CONVERT_TO=stemcell``` if using a stemcell controller. - Options are: ``` - CIRQUE_ENABLE=yes - FP_TRACKBALL_ENABLE=yes - RGBLIGHT_ENABLE=yes - RGB_MATRIX_ENABLE=yes - FP_EC11=yes - FP_EVQ=yes +CIRQUE_ENABLE=yes +FP_TRACKBALL_ENABLE=yes +RGBLIGHT_ENABLE=yes +RGB_MATRIX_ENABLE=yes +FP_PER_KEY_RGB=yes +FP_INDICATOR_LEDS=yes +FP_EC11=yes +FP_EVQ=yes +AUDIO_ENABLE=yes +HAPTIC_ENABLE=yes ``` 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/fingerpunch/ffkb/rp/v3/rules.mk b/keyboards/fingerpunch/ffkb/rp/v3/rules.mk new file mode 100644 index 0000000000..ebdf68c341 --- /dev/null +++ b/keyboards/fingerpunch/ffkb/rp/v3/rules.mk @@ -0,0 +1,38 @@ +AUDIO_ENABLE ?= no +AUDIO_DRIVER = pwm_hardware + +HAPTIC_ENABLE ?= no +HAPTIC_DRIVER = DRV2605L + +ifeq ($(strip $(FP_INDICATOR_LEDS)), yes) + OPT_DEFS += -DFP_INDICATOR_LEDS +endif + +ifeq ($(strip $(FP_PER_KEY_RGB)), yes) + OPT_DEFS += -DFP_PER_KEY_RGB +endif + +ifeq ($(strip $(CIRQUE_ENABLE)), yes) + MOUSEKEY_ENABLE := yes # not required, but enabling for mouse button keys + POINTING_DEVICE_ENABLE := yes + POINTING_DEVICE_DRIVER := cirque_pinnacle_i2c + OPT_DEFS += -DCIRQUE_ENABLE +endif + +ifeq ($(strip $(FP_TRACKBALL_ENABLE)), yes) + MOUSEKEY_ENABLE := yes # not required, but enabling for mouse button keys + POINTING_DEVICE_ENABLE := yes + POINTING_DEVICE_DRIVER := pmw3360 + QUANTUM_LIB_SRC += spi_master.c + OPT_DEFS += -DFP_TRACKBALL_ENABLE +endif + +ifeq ($(strip $(FP_EC11)), yes) + ENCODER_ENABLE := yes + OPT_DEFS += -DFP_EC11_UNDER_PALMS +endif + +ifeq ($(strip $(FP_EVQ)), yes) + ENCODER_ENABLE := yes + OPT_DEFS += -DFP_EVQ_UNDER_PALMS +endif diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/v3.c b/keyboards/fingerpunch/ffkb/rp/v3/v3.c similarity index 100% rename from keyboards/fingerpunch/ffkb/rp2040/v3/v3.c rename to keyboards/fingerpunch/ffkb/rp/v3/v3.c diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/v3.h b/keyboards/fingerpunch/ffkb/rp/v3/v3.h similarity index 81% rename from keyboards/fingerpunch/ffkb/rp2040/v3/v3.h rename to keyboards/fingerpunch/ffkb/rp/v3/v3.h index 16950faf53..952264bf09 100644 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/v3.h +++ b/keyboards/fingerpunch/ffkb/rp/v3/v3.h @@ -34,10 +34,10 @@ K32, K34, K35, K36, K37, K38, K39, K3B \ ) \ { \ - { K01, K03, K05, K04, K06, K07, K08, K02 }, \ - { K11, K13, K15, K14, K16, K17, K18, K12 }, \ - { K21, K23, K25, K24, K26, K27, K28, K22 }, \ - { KC_NO, K19, K0A, K2A, K1B, K2B, K0C, KC_NO }, \ - { KC_NO, K29, K1A, K09, K0B, K2C, K1C, KC_NO }, \ - { K3B, K39, K35, K34, K36, K37, K38, K32 } \ + { K02, K01, K03, K05, K04, K06, K07, K08 }, \ + { K12, K11, K13, K15, K14, K16, K17, K18 }, \ + { K22, K21, K23, K25, K24, K26, K27, K28 }, \ + { KC_NO, KC_NO, K19, K0A, K2A, K1B, K2B, K0C }, \ + { KC_NO, KC_NO, K29, K1A, K09, K0B, K2C, K1C }, \ + { K32, K3B, K39, K35, K34, K36, K37, K38 } \ } diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/mcuconf.h b/keyboards/fingerpunch/ffkb/rp2040/v3/mcuconf.h deleted file mode 100644 index 57de50198b..0000000000 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/mcuconf.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include_next "mcuconf.h" - -#undef STM32_SPI_USE_SPI0 -#define STM32_SPI_USE_SPI0 TRUE - -// Added because of this error at compile time -/* -Compiling: keyboards/fingerpunch/ffkb_byomcu/v3/matrix_74hc595_spi.c In file included from ./lib/chibios/os/hal/include/hal_spi_v2.h:146:0, - from ./lib/chibios/os/hal/include/hal_spi.h:31, - from ./lib/chibios/os/hal/include/hal.h:315, - from platforms/chibios/platform_deps.h:18, - from quantum/quantum.h:18, - from keyboards/fingerpunch/ffkb_byomcu/v3/matrix_74hc595_spi.c:3: -./lib/chibios/os/hal/ports/STM32/LLD/SPIv1/hal_spi_v2_lld.h:282:2: error: #error "SPI driver activated but no SPI peripheral assigned" - #error "SPI driver activated but no SPI peripheral assigned" - ^~~~~ - [ERRORS] -*/ -#undef STM32_SPI_USE_SPI1 -#define STM32_SPI_USE_SPI1 TRUE - -#undef STM32_ST_USE_TIMER -#define STM32_ST_USE_TIMER 5 \ No newline at end of file diff --git a/keyboards/fingerpunch/ffkb/rp2040/v3/via.json b/keyboards/fingerpunch/ffkb/rp2040/v3/via.json deleted file mode 100644 index 77b5f683ae..0000000000 --- a/keyboards/fingerpunch/ffkb/rp2040/v3/via.json +++ /dev/null @@ -1,322 +0,0 @@ -{ - "name": "ffkb", - "vendorId": "0xFEFE", - "productId": "0xFFBB", - "matrix": {"rows": 4, "cols": 12}, - "lighting": "qmk_rgblight", - "layouts": { - "labels": [ - ["Layout"] - ], - "keymap": [ - [ - { - "y": 4, - "x": 7 - }, - "3,9\nenc2" - ], - [ - { - "r": 15, - "rx": 1, - "y": -0.09999999999999998, - "x": 3 - }, - "0,3" - ], - [ - { - "y": -0.65, - "x": 2 - }, - "0,2", - { - "x": 1 - }, - "0,4" - ], - [ - { - "y": -0.85, - "x": 5 - }, - "0,5" - ], - [ - { - "y": -0.4999999999999999, - "x": 3, - "c": "#5dd971" - }, - "1,3\nAlt" - ], - [ - { - "y": -0.8999999999999999, - "x": 1, - "c": "#cccccc" - }, - "0,1" - ], - [ - { - "y": -0.75, - "x": 2, - "c": "#5dd971" - }, - "1,2\nWin", - { - "x": 1 - }, - "1,4\nShift" - ], - [ - { - "y": -0.8775, - "c": "#cccccc" - }, - "0,0" - ], - [ - { - "y": -0.9725000000000001, - "x": 5 - }, - "1,5" - ], - [ - { - "y": -0.5, - "x": 3 - }, - "2,3" - ], - [ - { - "y": -0.8999999999999999, - "x": 1, - "c": "#5dd971" - }, - "1,1\nCtrl" - ], - [ - { - "y": -0.75, - "x": 2, - "c": "#cccccc" - }, - "2,2", - { - "x": 1 - }, - "2,4" - ], - [ - { - "y": -0.8775 - }, - "1,0" - ], - [ - { - "y": -0.9725000000000001, - "x": 5 - }, - "2,5" - ], - [ - { - "y": -0.3999999999999999, - "x": 1 - }, - "2,1" - ], - [ - { - "y": -0.6275 - }, - "2,0" - ], - [ - { - "y": -0.6225000000000005, - "x": 2.5 - }, - "3,1\nenc1", - { - "x": 0.5 - }, - "3,3" - ], - [ - { - "r": 25, - "y": -1.9500000000000002, - "x": 5.8 - }, - "3,4" - ], - [ - { - "r": 35, - "y": -2.1999999999999997, - "x": 7.4 - }, - "3,5" - ], - [ - { - "r": -35, - "rx": 10.65, - "ry": 4.5, - "y": -0.25, - "x": -3.1000000000000005 - }, - "3,6" - ], - [ - { - "r": -25, - "y": -0.6500000000000004, - "x": -1.9000000000000004 - }, - "3,7" - ], - [ - { - "r": -15, - "y": -0.8499999999999996, - "x": -0.6500000000000004 - }, - "3,8", - { - "x": 0.5 - }, - "3,10\nenc3" - ], - [ - { - "rx": 11, - "ry": 4.3, - "y": -3.535 - }, - "0,8" - ], - [ - { - "y": -0.6499999999999999, - "x": -1 - }, - "0,7", - { - "x": 1 - }, - "0,9" - ], - [ - { - "y": -0.8499999999999999, - "x": -2 - }, - "0,6" - ], - [ - { - "y": -0.5, - "c": "#5dd971" - }, - "1,8\nAlt" - ], - [ - { - "y": -0.8999999999999997, - "x": 2, - "c": "#cccccc" - }, - "0,10" - ], - [ - { - "y": -0.7500000000000004, - "x": -1, - "c": "#5dd971" - }, - "1,7\nShift", - { - "x": 1 - }, - "1,9\nWin" - ], - [ - { - "y": -0.8775, - "x": 3, - "c": "#cccccc" - }, - "0,11" - ], - [ - { - "y": -0.9724999999999997, - "x": -2 - }, - "1,6" - ], - [ - { - "y": -0.5000000000000004 - }, - "2,8" - ], - [ - { - "y": -0.8999999999999995, - "x": 2, - "c": "#5dd971" - }, - "1,10\nCtrl" - ], - [ - { - "y": -0.7500000000000004, - "x": -1, - "c": "#cccccc" - }, - "2,7", - { - "x": 1 - }, - "2,9" - ], - [ - { - "y": -0.8912500000000003, - "x": 3 - }, - "1,11" - ], - [ - { - "y": -0.9737499999999999, - "x": -2 - }, - "2,6" - ], - [ - { - "y": -0.3849999999999998, - "x": 2 - }, - "2,10" - ], - [ - { - "y": -0.6412500000000003, - "x": 3 - }, - "2,11" - ] - ] - } -} \ No newline at end of file diff --git a/users/sadekbaroudi/process_records.c b/users/sadekbaroudi/process_records.c index 4cfceb6776..090ca6b303 100755 --- a/users/sadekbaroudi/process_records.c +++ b/users/sadekbaroudi/process_records.c @@ -24,13 +24,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } // If console is enabled, it will print the matrix position and status of each key pressed #endif -#ifdef KEYLOGGER_ENABLE -# if defined(KEYBOARD_ergodox_ez) || defined(KEYBOARD_keebio_iris_rev2) - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.row, record->event.key.col, record->event.pressed); -# else - xprintf("KL: kc: %u, col: %u, row: %u, pressed: %u\n", keycode, record->event.key.col, record->event.key.row, record->event.pressed); -# endif -#endif // KEYLOGGER_ENABLE if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record) // #ifdef USERSPACE_RGB_MATRIX_ENABLE @@ -44,44 +37,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } switch (keycode) { - // COMMENT TO DISABLE MACROS - case KC_MAKE: // Compiles the firmware, and adds the flash command based on keyboard bootloader - if (!record->event.pressed) { -#ifndef MAKE_BOOTLOADER - uint8_t temp_mod = mod_config(get_mods()); - uint8_t temp_osm = mod_config(get_oneshot_mods()); - clear_mods(); - clear_oneshot_mods(); -#endif - send_string_with_delay_P(PSTR("qmk"), TAP_CODE_DELAY); -#ifndef MAKE_BOOTLOADER - if ((temp_mod | temp_osm) & MOD_MASK_SHIFT) -#endif - { - send_string_with_delay_P(PSTR(" flash "), TAP_CODE_DELAY); -#ifndef MAKE_BOOTLOADER - } else { - send_string_with_delay_P(PSTR(" compile "), TAP_CODE_DELAY); -#endif - } - send_string_with_delay_P(PSTR("-kb " QMK_KEYBOARD " -km " QMK_KEYMAP), TAP_CODE_DELAY); -#ifdef RGB_MATRIX_SPLIT_RIGHT - send_string_with_delay_P(PSTR(" RGB_MATRIX_SPLIT_RIGHT=yes"), TAP_CODE_DELAY); -# ifndef OLED_DRIVER_ENABLE - send_string_with_delay_P(PSTR(" OLED_DRIVER_ENABLE=no"), TAP_CODE_DELAY); -# endif -#endif - send_string_with_delay_P(PSTR(SS_TAP(X_ENTER)), TAP_CODE_DELAY); - } - - break; - // COMMENT TO DISABLE MACROS - case VRSN: // Prints firmware version - if (record->event.pressed) { - send_string_with_delay_P(PSTR(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE), TAP_CODE_DELAY); - } - break; - case KC_RGB_T: // This allows me to use underglow as layer indication, or as normal #if defined(USERSPACE_RGBLIGHT_ENABLE) || defined(USERSPACE_RGB_MATRIX_ENABLE) if (record->event.pressed) { diff --git a/users/sadekbaroudi/process_records.h b/users/sadekbaroudi/process_records.h index 320fb46761..19a37af657 100755 --- a/users/sadekbaroudi/process_records.h +++ b/users/sadekbaroudi/process_records.h @@ -35,11 +35,9 @@ #endif enum userspace_custom_keycodes { - VRSN = PLACEHOLDER_SAFE_RANGE, // Prints QMK Firmware and board info - KC_RGB_T, // Toggles RGB Layer Indication mode - KC_RGB_BLT, // Toggles RGB Base Layer Override mode - RGB_IDL, // RGB Idling animations - KC_MAKE, // Run keyboard's customized make command + KC_RGB_T = PLACEHOLDER_SAFE_RANGE, // Toggles RGB Layer Indication mode + KC_RGB_BLT, // Toggles RGB Base Layer Override mode + RGB_IDL, // RGB Idling animations M_KI_R_SWAP, M_KI_R_ANGLE, M_KI_R_FREE, @@ -69,9 +67,6 @@ enum userspace_custom_keycodes { bool process_record_secrets(uint16_t keycode, keyrecord_t *record); bool process_record_keymap(uint16_t keycode, keyrecord_t *record); -#if defined(MOUSEKEY_ENABLE) || defined(POINTING_DEVICE_ENABLE) -report_mouse_t pointing_device_task_user(report_mouse_t mouse_report); -#endif #define KC_SEC1 KC_SECRET_1 #define KC_SEC2 KC_SECRET_2 diff --git a/users/sadekbaroudi/template.c b/users/sadekbaroudi/template.c deleted file mode 100755 index fce18c36b3..0000000000 --- a/users/sadekbaroudi/template.c +++ /dev/null @@ -1,82 +0,0 @@ -#include "template.h" - -// Add reconfigurable functions here, for keymap customization -// This allows for a global, userspace functions, and continued -// customization of the keymap. Use _keymap instead of _user -// functions in the keymaps -__attribute__((weak)) void matrix_init_keymap(void) {} - -// Call user matrix init, then call the keymap's init function -void matrix_init_user(void) { matrix_init_keymap(); } - -__attribute__((weak)) void matrix_scan_keymap(void) {} - -// No global matrix scan code, so just run keymap's matix -// scan function -void matrix_scan_user(void) { matrix_scan_keymap(); } - -__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; } - -// Defines actions tor my global custom keycodes. Defined in drashna.h file -// Then runs the _keymap's recod handier if not processed here, -// And use "NEWPLACEHOLDER" for new safe range -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case KC_MAKE: - if (!record->event.pressed) { - SEND_STRING("make " QMK_KEYBOARD ":" QMK_KEYMAP -#if (defined(BOOTLOADER_DFU) || defined(BOOTLOADER_LUFA_DFU) || defined(BOOTLOADER_QMK_DFU)) - ":dfu" -#elif defined(BOOTLOADER_HALFKAY) - ":teensy" -#elif defined(BOOTLOADER_CATERINA) - ":avrdude" -#endif - SS_TAP(X_ENTER)); - } - return false; - break; - - case VRSN: - if (record->event.pressed) { - SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; - break; - } - return process_record_keymap(keycode, record); -} - -__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; } - -layer_state_t layer_state_set_user(layer_state_t state) { return layer_state_set_keymap(state); } - -__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {} - -void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); } - -__attribute__((weak)) void suspend_power_down_keymap(void) {} - -void suspend_power_down_user(void) { suspend_power_down_keymap(); } - -__attribute__((weak)) void suspend_wakeup_init_keymap(void) {} - -void suspend_wakeup_init_user(void) { - suspend_wakeup_init_keymap(); -#ifdef KEYBOARD_ergodox_ez - wait_ms(10); -#endif -} - -__attribute__((weak)) void startup_keymap(void) {} - -void startup_user(void) { -#ifdef USERSPACE_RGBLIGHT_ENABLE - matrix_init_rgb(); -#endif // USERSPACE_RGBLIGHT_ENABLE - startup_keymap(); -} - -__attribute__((weak)) void shutdown_keymap(void) {} - -void shutdown_user(void) { shutdown_keymap(); } diff --git a/users/sadekbaroudi/template.h b/users/sadekbaroudi/template.h deleted file mode 100755 index 178f96e220..0000000000 --- a/users/sadekbaroudi/template.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once - -#include QMK_KEYBOARD_H -#include "version.h" -#include "eeprom.h" - -// Define layer names -#define BASE 0 - -enum custom_keycodes { - VRSN = SAFE_RANGE, // can always be here - KC_MAKE, - KC_RESET, - NEWPLACEHOLDER // use "NEWPLACEHOLDER for keymap specific codes -};