WIP: ffkb integrated RP2040 v3 support
This commit is contained in:
parent
ad1d2af870
commit
6b87a57335
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
Copyright 2021 Sadek Baroudi <sadekbaroudi@gmail.com>
|
||||
|
||||
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"
|
||||
|
||||
/* 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
|
||||
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
/*
|
||||
* Copyright 2022 Charly Delay <charly@codesink.dev> (@0xcharly)
|
||||
/* Copyright 2021 Sadek Baroudi <sadekbaroudi@gmail.com>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#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"
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
/* Copyright 2022 Sadek Baroudi <sadekbaroudi@gmail.com>
|
||||
*
|
||||
* 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"
|
||||
|
||||
#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"
|
||||
|
|
@ -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
|
||||
|
|
@ -25,24 +25,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
// 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 <http://www.gnu.org/licenses/>.
|
|||
#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 <http://www.gnu.org/licenses/>.
|
|||
#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
|
||||
|
||||
|
||||
|
|
@ -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?"
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
/*
|
||||
* Copyright 2023 Sadek Baroudi <sadekbaroudi@gmail.com> (@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 <halconf.h>
|
||||
|
|
@ -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 <sadekbaroudi@gmail.com>",
|
||||
"usb": {
|
||||
"vid": "0xFEFE",
|
||||
"vid": "0xFE2B",
|
||||
"pid": "0xFFBB",
|
||||
"device_version": "3.0.0"
|
||||
}
|
||||
|
|
@ -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____________________,
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#pragma once
|
||||
|
||||
#include_next <mcuconf.h>
|
||||
|
||||
#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
|
||||
|
|
@ -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).
|
||||
|
|
@ -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
|
||||
|
|
@ -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 } \
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -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"
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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(); }
|
||||
|
|
@ -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
|
||||
};
|
||||
Loading…
Reference in New Issue