Skip to content

Commit

Permalink
Merge branch 'sadekbaroudi:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
nwhelan authored Nov 5, 2023
2 parents e768a34 + 211065a commit 6b9be6d
Show file tree
Hide file tree
Showing 184 changed files with 11,649 additions and 560 deletions.
54 changes: 35 additions & 19 deletions keyboards/fingerpunch/FP_LIBRARY_SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,50 @@ That said, if you are looking to leverage the features, you may be able to follo

## Required additions to the keyboard codebase

1. Add the following line to your keyboard {keyboard_name}.h file, e.g. ffkb_byomcu.h
### Main fingerpunch src entry point

Add the following line to your keyboard {keyboard_name}.h file, e.g. ffkb_byomcu.h

`#include "keyboards/fingerpunch/src/fp.h"`

2. Include the source files in your keyboard's `rules.mk` file
### Custom config.h

Note that below is an example. You should check for the latest version of this code block as found in `keyboards/fingerpunch/ffkb_byomcu/rules.mk`
Add this to the keyboard's config.h to allow for custom fingerpunch config.h inclusions

### General file inclusion for feature support
The following should go at the beginning of the keyboard's config.h
`#include "keyboards/fingerpunch/src/config_pre.h"`

```make
DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
The following should go at the end of the keyboard's config.h
`#include "keyboards/fingerpunch/src/config_post.h"`

```
### Custom rules.mk

### Custom config.h
Add this to the keyboard's rules.mk at the very bottom of the file:
`include keyboards/fingerpunch/src/rules.mk`

Add this to the keyboard's config.h to allow for custom fingerpunch config.h inclusions
`#include "keyboards/fingerpunch/src/config.h"`
### VIK support

For boards with a VIK connector, be sure to add the following to the keyboard rules.mk
`VIK_ENABLE = yes`

Also, define the VIK pin configuration in the keyboard's config.h, and remove the SPI and I2C from that config file, as it gets defined in `keyboards/fingerpunch/src/vik/config.h`

Example from `keyboards/fingerpunch/svlinky/config.h`

```c
// VIK pin config
#define VIK_SPI_DRIVER SPID1
#define VIK_SPI_SCK_PIN GP14
#define VIK_SPI_MOSI_PIN GP15
#define VIK_SPI_MISO_PIN GP12
#define VIK_SPI_CS GP13
#define VIK_I2C_DRIVER I2CD1
#define VIK_I2C_SDA_PIN GP10
#define VIK_I2C_SCL_PIN GP11
#define VIK_GPIO_1 GP18
#define VIK_GPIO_2 GP24
#define VIK_WS2812_DI_PIN GP16
```
### Audio startup sound
Expand Down
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/arachnophobe/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* key matrix size */
/* Rows are doubled up */
Expand Down
11 changes: 1 addition & 10 deletions keyboards/fingerpunch/arachnophobe/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,4 @@ OLED_ENABLE = no # this can be yes or no depending on if you have an
EXTRAFLAGS += -flto # macros enable or disable
MOUSEKEY_ENABLE = yes

DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
include keyboards/fingerpunch/src/rules.mk
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/barobord/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* key matrix size */
/* Rows are doubled up */
Expand Down
11 changes: 1 addition & 10 deletions keyboards/fingerpunch/barobord/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,4 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif

DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
include keyboards/fingerpunch/src/rules.mk
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/barobord_byomcu/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* key matrix size */
/* Rows are doubled up */
Expand Down
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/barobord_byomcu/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manufacturer": "sadekbaroudi",
"keyboard_name": "barobord_byomcu",
"keyboard_name": "barobord",
"url": "https://github.com/sadekbaroudi/barobord",
"maintainer": "Sadek Baroudi <[email protected]>",
"usb": {
Expand Down
11 changes: 1 addition & 10 deletions keyboards/fingerpunch/barobord_byomcu/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,4 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif

DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
include keyboards/fingerpunch/src/rules.mk
8 changes: 6 additions & 2 deletions keyboards/fingerpunch/bgkeeb/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* key matrix size */
// Rows are doubled-up
Expand Down Expand Up @@ -51,15 +51,19 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
#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
// If pointing device enabled, there isn't enough flash for the firmware, so we remove some rgb effects
#ifndef POINTING_DEVICE_ENABLE
#define RGBLIGHT_EFFECT_ALTERNATING
#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
// END If pointing device enabled
#endif

#define ENCODERS_PAD_A {B5}
Expand Down
16 changes: 4 additions & 12 deletions keyboards/fingerpunch/bgkeeb/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,17 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
ENCODER_ENABLE = no
POINTING_DEVICE_ENABLE = no

SPLIT_KEYBOARD = yes

LAYOUTS = split_3x5_3

ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
POINTING_DEVICE_ENABLE = yes
POINTING_DEVICE_DRIVER = pimoroni_trackball
POINTING_DEVICE_ENABLE := yes
POINTING_DEVICE_DRIVER := pimoroni_trackball
QUANTUM_LIB_SRC += i2c_master.c
SRC += drivers/sensors/pimoroni_trackball.c
endif

DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
include keyboards/fingerpunch/src/rules.mk
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/bigbarobord/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* key matrix size */
/* Rows are doubled up */
Expand Down
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/bigbarobord/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manufacturer": "sadekbaroudi",
"keyboard_name": "bigbarobord",
"keyboard_name": "big barobord",
"url": "https://fingerpunch.xyz/product/big-barobord/",
"maintainer": "Sadek Baroudi <[email protected]>",
"usb": {
Expand Down
11 changes: 1 addition & 10 deletions keyboards/fingerpunch/bigbarobord/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,4 @@ ifeq ($(strip $(PIMORONI_TRACKBALL_ENABLE)), yes)
OPT_DEFS += -DPIMORONI_TRACKBALL_ENABLE
endif

DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
include keyboards/fingerpunch/src/rules.mk
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/euclid36/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* key matrix size */
/* Rows are doubled up */
Expand Down
11 changes: 1 addition & 10 deletions keyboards/fingerpunch/euclid36/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,4 @@ THUMBSTICK_ENABLE := no
# SRC += thumbstick.c
#endif

DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
include keyboards/fingerpunch/src/rules.mk
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/ffkb/atmega/v1/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* key matrix size */
/* Rows are doubled up */
Expand Down
11 changes: 1 addition & 10 deletions keyboards/fingerpunch/ffkb/atmega/v1/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,4 @@ ifeq ($(strip $(FP_EVQ_UNDER_PALMS)), yes)
OPT_DEFS += -DFP_EVQ_UNDER_PALMS
endif

DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
include keyboards/fingerpunch/src/rules.mk
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/ffkb/byomcu/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
Expand Down
11 changes: 1 addition & 10 deletions keyboards/fingerpunch/ffkb/byomcu/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,4 @@ ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
endif

DEFERRED_EXEC_ENABLE = yes
SRC += keyboards/fingerpunch/src/fp.c \
keyboards/fingerpunch/src/fp_haptic.c \
keyboards/fingerpunch/src/fp_audio.c \
keyboards/fingerpunch/src/fp_keyhandler.c \
keyboards/fingerpunch/src/fp_encoder.c \
keyboards/fingerpunch/src/fp_pointing.c \
keyboards/fingerpunch/src/fp_rgb_common.c \
keyboards/fingerpunch/src/fp_rgblight.c \
keyboards/fingerpunch/src/fp_rgb_matrix.c
include keyboards/fingerpunch/src/rules.mk
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/ffkb/byomcu/v1/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manufacturer": "sadekbaroudi",
"keyboard_name": "ffkb byomcu",
"keyboard_name": "ffkb",
"url": "https://fingerpunch.xyz/product/faux-fox-keyboard/",
"maintainer": "Sadek Baroudi <[email protected]>",
"usb": {
Expand Down
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/ffkb/byomcu/v2/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manufacturer": "sadekbaroudi",
"keyboard_name": "ffkb byomcu",
"keyboard_name": "ffkb",
"url": "https://fingerpunch.xyz/product/faux-fox-keyboard-v2/",
"maintainer": "Sadek Baroudi <[email protected]>",
"usb": {
Expand Down
2 changes: 1 addition & 1 deletion keyboards/fingerpunch/ffkb/byomcu/v3/info.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"manufacturer": "sadekbaroudi",
"keyboard_name": "ffkb byomcu",
"keyboard_name": "ffkb",
"url": "https://fingerpunch.xyz/product/faux-fox-keyboard-v3/",
"maintainer": "Sadek Baroudi <[email protected]>",
"usb": {
Expand Down
18 changes: 17 additions & 1 deletion keyboards/fingerpunch/ffkb/lite/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#pragma once

#include "keyboards/fingerpunch/src/config.h"
#include "keyboards/fingerpunch/src/config_pre.h"

/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
Expand Down Expand Up @@ -51,3 +51,19 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE

#ifdef FP_CONVERT_TO_SVLINKY
// VIK pin config
#define VIK_SPI_DRIVER SPID1
#define VIK_SPI_SCK_PIN GP14
#define VIK_SPI_MOSI_PIN GP15
#define VIK_SPI_MISO_PIN GP12
#define VIK_SPI_CS GP13
#define VIK_I2C_DRIVER I2CD1
#define VIK_I2C_SDA_PIN GP10
#define VIK_I2C_SCL_PIN GP11
#define VIK_GPIO_1 GP18
#define VIK_GPIO_2 GP24
#define VIK_WS2812_DI_PIN GP16
#endif

#include "keyboards/fingerpunch/src/config_post.h"
25 changes: 25 additions & 0 deletions keyboards/fingerpunch/ffkb/lite/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright 2022 Charly Delay <[email protected]> (@0xcharly)
*
* 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 <https://www.gnu.org/licenses/>.
*/

#pragma once

#ifdef FP_CONVERT_TO_SVLINKY
#define HAL_USE_SPI TRUE
#define HAL_USE_I2C TRUE
#endif

#include_next "halconf.h"
Loading

0 comments on commit 6b9be6d

Please sign in to comment.