From b8cd7103bd9c9b6f043166e1b25dde633846dc2d Mon Sep 17 00:00:00 2001 From: Sadek Baroudi Date: Fri, 28 Oct 2022 14:47:51 -0700 Subject: [PATCH] fixing ximi for github actions, still needs a little cleaning up --- keyboards/fingerpunch/ximi/config.h | 48 ++++++++----- keyboards/fingerpunch/ximi/fp_build.json | 23 +++---- keyboards/fingerpunch/ximi/readme.md | 26 ++++--- keyboards/fingerpunch/ximi/rules.mk | 88 +++++++++++++++--------- 4 files changed, 115 insertions(+), 70 deletions(-) diff --git a/keyboards/fingerpunch/ximi/config.h b/keyboards/fingerpunch/ximi/config.h index ae02db6edd..afb5a2da7c 100644 --- a/keyboards/fingerpunch/ximi/config.h +++ b/keyboards/fingerpunch/ximi/config.h @@ -178,15 +178,6 @@ along with this program. If not, see . #define POINTING_DEVICE_ROTATION_90_RIGHT #define I2C1_CLOCK_SPEED 400000 #define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 -#ifdef FP_CIRQUE_BOTH - #define POINTING_DEVICE_COMBINED -#endif -#ifdef FP_CIRQUE_LEFT - #define POINTING_DEVICE_LEFT -#endif -#ifdef FP_CIRQUE_RIGHT - #define POINTING_DEVICE_RIGHT -#endif #endif #ifdef FP_TRACKBALL_ENABLE @@ -201,15 +192,38 @@ along with this program. If not, see . // #define SPI_MOSI_PAL_MODE 5 // already defined in chibios #define SPI_MISO_PIN GP4 // #define SPI_MISO_PAL_MODE 5 // already defined in chibios -#ifdef FP_TRACKBALL_BOTH - #define POINTING_DEVICE_COMBINED - #define POINTING_DEVICE_INVERT_Y // This inverts the Y on the left side only - #define POINTING_DEVICE_INVERT_X_RIGHT #endif -#ifdef FP_TRACKBALL_LEFT - #define POINTING_DEVICE_LEFT + +// If both sides have a pointing device +#if defined(FP_TRACKBALL_BOTH) || \ + defined(FP_CIRQUE_BOTH) || \ + defined(FP_TRACKBALL_LEFT_CIRQUE_RIGHT) || \ + defined(FP_CIRQUE_LEFT_TRACKBALL_RIGHT) + #define POINTING_DEVICE_COMBINED #endif -#ifdef FP_TRACKBALL_RIGHT - #define POINTING_DEVICE_RIGHT + +// If the left side has a pointing device +#if defined(FP_TRACKBALL_LEFT_ONLY) || \ + defined(FP_CIRQUE_LEFT_ONLY) + #define POINTING_DEVICE_LEFT #endif + +// If the right side has a pointing device +#if defined(FP_TRACKBALL_RIGHT_ONLY) || \ + defined(FP_CIRQUE_RIGHT_ONLY) + #define POINTING_DEVICE_RIGHT +#endif + +// If there is a trackball on the left side +#if defined(FP_TRACKBALL_BOTH) || \ + defined(FP_TRACKBALL_LEFT_CIRQUE_RIGHT) || \ + defined(FP_TRACKBALL_LEFT_ONLY) + #define POINTING_DEVICE_INVERT_Y // This inverts the Y on the left side only +#endif + +// If there is a trackball on the right side +#if defined(FP_TRACKBALL_BOTH) || \ + defined(FP_CIRQUE_LEFT_TRACKBALL_RIGHT) || \ + defined(FP_TRACKBALL_RIGHT_ONLY) + #define POINTING_DEVICE_INVERT_X_RIGHT #endif diff --git a/keyboards/fingerpunch/ximi/fp_build.json b/keyboards/fingerpunch/ximi/fp_build.json index ccbf470566..8485e9c929 100644 --- a/keyboards/fingerpunch/ximi/fp_build.json +++ b/keyboards/fingerpunch/ximi/fp_build.json @@ -1,24 +1,23 @@ [ { "type" : "one-of", - "names" : [ "FP_TRACKBALL_BOTH", "FP_TRACKBALL_LEFT", "FP_TRACKBALL_RIGHT" ], - "user_input": "Do you have a no trackball, on both sides, left, or right?" - }, - { - "type" : "one-of", - "names" : [ "FP_CIRQUE_BOTH", "FP_CIRQUE_LEFT", "FP_CIRQUE_RIGHT" ], - "user_input": "Do you have a no cirque trackpad, on both sides, left, or right?" + "names" : [ + "FP_TRACKBALL_BOTH", + "FP_CIRQUE_BOTH", + "FP_TRACKBALL_LEFT_ONLY", + "FP_TRACKBALL_RIGHT_ONLY", + "FP_CIRQUE_LEFT_ONLY", + "FP_CIRQUE_RIGHT_ONLY", + "FP_TRACKBALL_LEFT_CIRQUE_RIGHT", + "FP_CIRQUE_LEFT_TRACKBALL_RIGHT" + ], + "user_input": "What config would you like to use? (FP_TRACKBALL_BOTH, FP_CIRQUE_BOTH, FP_TRACKBALL_LEFT_ONLY, FP_TRACKBALL_RIGHT_ONLY, FP_CIRQUE_LEFT_ONLY, FP_CIRQUE_RIGHT_ONLY, FP_TRACKBALL_LEFT_CIRQUE_RIGHT, FP_CIRQUE_LEFT_TRACKBALL_RIGHT): " }, { "type" : "single", "name" : "RGBLIGHT_ENABLE", "user_input": "Do you have RGB?" }, - { - "type" : "single", - "name" : "AUDIO_ENABLE", - "user_input": "Do you have audio buzzer?" - }, { "type" : "single", "name" : "HAPTIC_ENABLE", diff --git a/keyboards/fingerpunch/ximi/readme.md b/keyboards/fingerpunch/ximi/readme.md index 4de4248847..f057119d65 100644 --- a/keyboards/fingerpunch/ximi/readme.md +++ b/keyboards/fingerpunch/ximi/readme.md @@ -3,28 +3,36 @@ * Keyboard Maintainer: sadekbaroudi * Hardware Supported: ximi PCB +IMPORTANT NOTE TO SELF, ADD THIS BACK INTO fp_build.json WHEN AUDIO SUPPORT IS AVAILABLE FOR RP2040 + { + "type" : "single", + "name" : "AUDIO_ENABLE", + "user_input": "Do you have audio buzzer?" + }, + Make example for this keyboard (after setting up your build environment): ``` make fingerpunch/ximi:default RGBLIGHT_ENABLE=yes FP_CIRQUE_BOTH=yes HAPTIC_ENABLE=yes ``` -Don't forget to add ```CONVERT_TO=stemcell``` if using a stemcell controller. - Options are: ``` - FP_TRACKBALL_BOTH=yes - FP_TRACKBALL_LEFT=yes - FP_TRACKBALL_RIGHT=yes - FP_CIRQUE_BOTH=yes - FP_CIRQUE_LEFT=yes - FP_CIRQUE_RIGHT=yes RGBLIGHT_ENABLE=yes AUDIO_ENABLE=yes HAPTIC_FEEDBACK=yes + // for the options below, select only one, or none + FP_TRACKBALL_BOTH=yes + FP_CIRQUE_BOTH=yes + FP_TRACKBALL_LEFT_ONLY=yes + FP_TRACKBALL_RIGHT_ONLY=yes + FP_CIRQUE_LEFT_ONLY=yes + FP_CIRQUE_RIGHT_ONLY=yes + FP_TRACKBALL_LEFT_CIRQUE_RIGHT=yes + FP_CIRQUE_LEFT_TRACKBALL_RIGHT=yes ``` Notes: -* Pick one (or none) of FP_TRACKBALL_* only. Pick one (or none) of FP_CIRQUE_* only. +* Pick one (or none) of FP_TRACKBALL_* or FP_CIRQUE_* only. * If you are using a trackball, you cannot use per key rgb or audio. It will be automatically disabled. The hardware doesn't support them together. See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/fingerpunch/ximi/rules.mk b/keyboards/fingerpunch/ximi/rules.mk index e56e1ef84b..d0dc67ed47 100644 --- a/keyboards/fingerpunch/ximi/rules.mk +++ b/keyboards/fingerpunch/ximi/rules.mk @@ -42,50 +42,74 @@ HAPTIC_DRIVER = DRV2605L # Pending https://github.com/qmk/qmk_firmware/pull/17723 and https://github.com/qmk/qmk_firmware/pull/17706 AUDIO_ENABLE ?= no -FP_CIRQUE_BOTH ?= no # Choose one of (BOTH, LEFT, RIGHT) -FP_CIRQUE_LEFT ?= no # Choose one of (BOTH, LEFT, RIGHT) -FP_CIRQUE_RIGHT ?= no # Choose one of (BOTH, LEFT, RIGHT) CIRQUE_ENABLE = no # Don't set this one, gets set automatically by FP_CIRQUE_* +PMW3360_ENABLE = no # Don't set this one, gets set automatically by FP_TRACKBALL_* -ifeq ($(strip $(FP_CIRQUE_BOTH)), yes) - CIRQUE_ENABLE := yes - OPT_DEFS += -DFP_CIRQUE_BOTH -endif - -ifeq ($(strip $(FP_CIRQUE_LEFT)), yes) - CIRQUE_ENABLE := yes - OPT_DEFS += -DFP_CIRQUE_LEFT -endif - -ifeq ($(strip $(FP_CIRQUE_RIGHT)), yes) - CIRQUE_ENABLE := yes - OPT_DEFS += -DFP_CIRQUE_RIGHT -endif - -ifeq ($(strip $(CIRQUE_ENABLE)), yes) - POINTING_DEVICE_ENABLE := yes - POINTING_DEVICE_DRIVER := cirque_pinnacle_i2c - OPT_DEFS += -DCIRQUE_ENABLE -endif - -FP_TRACKBALL_BOTH ?= no # Choose one of (BOTH, LEFT, RIGHT) -FP_TRACKBALL_LEFT ?= no # Choose one of (BOTH, LEFT, RIGHT) -FP_TRACKBALL_RIGHT ?= no # Choose one of (BOTH, LEFT, RIGHT) -PMW3360_ENABLE = no # Don't set this one, gets set automatically by FP_TRACKBALL_* +# Choose only one (or none) of the 8 options below +FP_TRACKBALL_BOTH ?= no +FP_CIRQUE_BOTH ?= no +FP_TRACKBALL_LEFT_ONLY ?= no +FP_TRACKBALL_RIGHT_ONLY ?= no +FP_CIRQUE_LEFT_ONLY ?= no +FP_CIRQUE_RIGHT_ONLY ?= no +FP_TRACKBALL_LEFT_CIRQUE_RIGHT ?= no +FP_CIRQUE_LEFT_TRACKBALL_RIGHT ?= no ifeq ($(strip $(FP_TRACKBALL_BOTH)), yes) PMW3360_ENABLE := yes OPT_DEFS += -DFP_TRACKBALL_BOTH endif -ifeq ($(strip $(FP_TRACKBALL_LEFT)), yes) +ifeq ($(strip $(FP_TRACKBALL_LEFT_ONLY)), yes) PMW3360_ENABLE := yes - OPT_DEFS += -DFP_TRACKBALL_LEFT + OPT_DEFS += -DFP_TRACKBALL_LEFT_ONLY endif -ifeq ($(strip $(FP_TRACKBALL_RIGHT)), yes) +ifeq ($(strip $(FP_TRACKBALL_RIGHT_ONLY)), yes) PMW3360_ENABLE := yes - OPT_DEFS += -DFP_TRACKBALL_RIGHT + OPT_DEFS += -DFP_TRACKBALL_RIGHT_ONLY +endif + +ifeq ($(strip $(FP_TRACKBALL_LEFT_CIRQUE_RIGHT)), yes) + PMW3360_ENABLE := yes + OPT_DEFS += -DFP_TRACKBALL_LEFT_CIRQUE_RIGHT +endif + +ifeq ($(strip $(FP_CIRQUE_LEFT_TRACKBALL_RIGHT)), yes) + PMW3360_ENABLE := yes + OPT_DEFS += -DFP_CIRQUE_LEFT_TRACKBALL_RIGHT +endif + +ifeq ($(strip $(FP_CIRQUE_BOTH)), yes) + CIRQUE_ENABLE := yes + OPT_DEFS += -DFP_CIRQUE_BOTH +endif + +ifeq ($(strip $(FP_CIRQUE_LEFT_ONLY)), yes) + CIRQUE_ENABLE := yes + OPT_DEFS += -DFP_CIRQUE_LEFT_ONLY +endif + +ifeq ($(strip $(FP_CIRQUE_RIGHT_ONLY)), yes) + CIRQUE_ENABLE := yes + OPT_DEFS += -DFP_CIRQUE_RIGHT_ONLY +endif + +ifeq ($(strip $(FP_TRACKBALL_LEFT_CIRQUE_RIGHT)), yes) + CIRQUE_ENABLE := yes + OPT_DEFS += -DFP_TRACKBALL_LEFT_CIRQUE_RIGHT +endif + +ifeq ($(strip $(FP_CIRQUE_LEFT_TRACKBALL_RIGHT)), yes) + CIRQUE_ENABLE := yes + OPT_DEFS += -DFP_CIRQUE_LEFT_TRACKBALL_RIGHT +endif + + +ifeq ($(strip $(CIRQUE_ENABLE)), yes) + POINTING_DEVICE_ENABLE := yes + POINTING_DEVICE_DRIVER := cirque_pinnacle_i2c + OPT_DEFS += -DCIRQUE_ENABLE endif ifeq ($(strip $(PMW3360_ENABLE)), yes)