From 12dfd773b41673c7524d806cb1109751ec0ddbe3 Mon Sep 17 00:00:00 2001 From: Charly Delay Date: Sun, 30 Oct 2022 10:28:10 +0900 Subject: [PATCH] Address code review comments --- keyboards/bastardkb/charybdis/3x5/blackpill/config.h | 2 +- keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h | 2 +- keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h | 2 +- keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h | 4 ++-- keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h | 2 +- keyboards/bastardkb/charybdis/3x5/v2/stemcell/rules.mk | 1 - keyboards/bastardkb/charybdis/3x6/blackpill/config.h | 2 +- keyboards/bastardkb/charybdis/3x6/v1/elitec/config.h | 2 +- keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h | 2 +- keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h | 4 ++-- keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h | 2 +- keyboards/bastardkb/charybdis/3x6/v2/stemcell/rules.mk | 1 - keyboards/bastardkb/charybdis/4x6/blackpill/config.h | 2 +- keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h | 2 +- keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h | 2 +- keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h | 4 ++-- keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h | 2 +- keyboards/bastardkb/charybdis/4x6/v2/stemcell/rules.mk | 1 - keyboards/bastardkb/dilemma/3x5_2/assembled/config.h | 2 +- keyboards/bastardkb/dilemma/3x5_3/config.h | 6 ++---- keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/keymap.c | 3 +-- 21 files changed, 22 insertions(+), 28 deletions(-) diff --git a/keyboards/bastardkb/charybdis/3x5/blackpill/config.h b/keyboards/bastardkb/charybdis/3x5/blackpill/config.h index ddd5e83318b9..ef99f3b6313d 100644 --- a/keyboards/bastardkb/charybdis/3x5/blackpill/config.h +++ b/keyboards/bastardkb/charybdis/3x5/blackpill/config.h @@ -58,5 +58,5 @@ #define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN B14 +#define POINTING_DEVICE_CS_PIN B14 #define PMW33XX_CS_DIVISOR 64 diff --git a/keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h b/keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h index 3e3d95174ce7..8a9d40ac639a 100644 --- a/keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h +++ b/keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h @@ -39,4 +39,4 @@ #define RGB_DI_PIN D3 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN B0 +#define POINTING_DEVICE_CS_PIN B0 diff --git a/keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h b/keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h index 5c11fa314585..2667ee9e7e40 100644 --- a/keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h +++ b/keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h @@ -33,4 +33,4 @@ #define RGB_DI_PIN D3 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN F0 +#define POINTING_DEVICE_CS_PIN F0 diff --git a/keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h b/keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h index ad4edb4cfaee..98d431f6f673 100644 --- a/keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h +++ b/keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h @@ -48,11 +48,11 @@ #ifdef SPLINKY_BETA_PINOUT # define SPI_SCK_PIN GP18 # define SPI_MOSI_PIN GP19 -# define PMW33XX_CS_PIN GP14 +# define POINTING_DEVICE_CS_PIN GP14 #else # define SPI_SCK_PIN GP22 # define SPI_MOSI_PIN GP23 -# define PMW33XX_CS_PIN GP16 +# define POINTING_DEVICE_CS_PIN GP16 #endif // SPLINKY_BETA_PINOUT /* Reset. */ diff --git a/keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h b/keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h index a5a163a80240..a06859b2154d 100644 --- a/keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h +++ b/keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h @@ -58,6 +58,6 @@ /* PMW3360 settings. */ #define A1 PAL_LINE(GPIOA, 1) -#define PMW33XX_CS_PIN A1 +#define POINTING_DEVICE_CS_PIN A1 #define PMW3360_CS_MODE 3 #define PMW3360_CS_DIVISOR 64 diff --git a/keyboards/bastardkb/charybdis/3x5/v2/stemcell/rules.mk b/keyboards/bastardkb/charybdis/3x5/v2/stemcell/rules.mk index 49b918682dd3..e4a9ce289c39 100644 --- a/keyboards/bastardkb/charybdis/3x5/v2/stemcell/rules.mk +++ b/keyboards/bastardkb/charybdis/3x5/v2/stemcell/rules.mk @@ -29,7 +29,6 @@ LAYOUTS = split_3x5_3 POINTING_DEVICE_ENABLE = yes # Enable trackball POINTING_DEVICE_DRIVER = pmw3360 -# https://qmk.fm/changes/2018-11-16-use-a-single-endpoint-for-hid-reports MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint KEYBOARD_SHARED_EP = yes diff --git a/keyboards/bastardkb/charybdis/3x6/blackpill/config.h b/keyboards/bastardkb/charybdis/3x6/blackpill/config.h index 1b90a3076b4d..93d897a4feb5 100644 --- a/keyboards/bastardkb/charybdis/3x6/blackpill/config.h +++ b/keyboards/bastardkb/charybdis/3x6/blackpill/config.h @@ -56,5 +56,5 @@ #define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN B14 +#define POINTING_DEVICE_CS_PIN B14 #define PMW33XX_CS_DIVISOR 64 diff --git a/keyboards/bastardkb/charybdis/3x6/v1/elitec/config.h b/keyboards/bastardkb/charybdis/3x6/v1/elitec/config.h index 05746cf17ef8..fa1a1c01f7e1 100644 --- a/keyboards/bastardkb/charybdis/3x6/v1/elitec/config.h +++ b/keyboards/bastardkb/charybdis/3x6/v1/elitec/config.h @@ -38,4 +38,4 @@ #define RGB_DI_PIN D3 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN B0 +#define POINTING_DEVICE_CS_PIN B0 diff --git a/keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h b/keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h index edd167446b87..e9d45e6796fb 100644 --- a/keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h +++ b/keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h @@ -33,4 +33,4 @@ #define RGB_DI_PIN D3 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN F0 +#define POINTING_DEVICE_CS_PIN F0 diff --git a/keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h b/keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h index b09f4b779413..2b5c1c4b0948 100644 --- a/keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h +++ b/keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h @@ -48,11 +48,11 @@ #ifdef SPLINKY_BETA_PINOUT # define SPI_SCK_PIN GP18 # define SPI_MOSI_PIN GP19 -# define PMW33XX_CS_PIN GP14 +# define POINTING_DEVICE_CS_PIN GP14 #else # define SPI_SCK_PIN GP22 # define SPI_MOSI_PIN GP23 -# define PMW33XX_CS_PIN GP16 +# define POINTING_DEVICE_CS_PIN GP16 #endif // SPLINKY_BETA_PINOUT /* Reset. */ diff --git a/keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h b/keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h index 348eea873250..81c7e737a7cd 100644 --- a/keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h +++ b/keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h @@ -58,6 +58,6 @@ /* PMW3360 settings. */ #define A1 PAL_LINE(GPIOA, 1) -#define PMW33XX_CS_PIN A1 +#define POINTING_DEVICE_CS_PIN A1 #define PMW3360_CS_MODE 3 #define PMW3360_CS_DIVISOR 64 diff --git a/keyboards/bastardkb/charybdis/3x6/v2/stemcell/rules.mk b/keyboards/bastardkb/charybdis/3x6/v2/stemcell/rules.mk index 20bbc8e42777..94cd8a0deb44 100644 --- a/keyboards/bastardkb/charybdis/3x6/v2/stemcell/rules.mk +++ b/keyboards/bastardkb/charybdis/3x6/v2/stemcell/rules.mk @@ -29,7 +29,6 @@ LAYOUTS = split_3x6_3 POINTING_DEVICE_ENABLE = yes # Enable trackball POINTING_DEVICE_DRIVER = pmw3360 -# https://qmk.fm/changes/2018-11-16-use-a-single-endpoint-for-hid-reports MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint KEYBOARD_SHARED_EP = yes diff --git a/keyboards/bastardkb/charybdis/4x6/blackpill/config.h b/keyboards/bastardkb/charybdis/4x6/blackpill/config.h index 2514a52fb00d..e37df487fd8b 100644 --- a/keyboards/bastardkb/charybdis/4x6/blackpill/config.h +++ b/keyboards/bastardkb/charybdis/4x6/blackpill/config.h @@ -58,5 +58,5 @@ #define EXTERNAL_EEPROM_SPI_SLAVE_SELECT_PIN A4 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN B14 +#define POINTING_DEVICE_CS_PIN B14 #define PMW33XX_CS_DIVISOR 64 diff --git a/keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h b/keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h index 15044ef645d1..710c4c35876a 100644 --- a/keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h +++ b/keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h @@ -39,4 +39,4 @@ #define RGB_DI_PIN D3 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN B0 +#define POINTING_DEVICE_CS_PIN B0 diff --git a/keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h b/keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h index 891e511ccb0d..692a28b7bea1 100644 --- a/keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h +++ b/keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h @@ -33,4 +33,4 @@ #define RGB_DI_PIN D3 /* PMW3360 settings. */ -#define PMW33XX_CS_PIN F0 +#define POINTING_DEVICE_CS_PIN F0 diff --git a/keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h b/keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h index 21ae26ffae9c..46090b91e118 100644 --- a/keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h +++ b/keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h @@ -48,11 +48,11 @@ #ifdef SPLINKY_BETA_PINOUT # define SPI_SCK_PIN GP18 # define SPI_MOSI_PIN GP19 -# define PMW33XX_CS_PIN GP14 +# define POINTING_DEVICE_CS_PIN GP14 #else # define SPI_SCK_PIN GP22 # define SPI_MOSI_PIN GP23 -# define PMW33XX_CS_PIN GP16 +# define POINTING_DEVICE_CS_PIN GP16 #endif // SPLINKY_BETA_PINOUT /* Reset. */ diff --git a/keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h b/keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h index 18966415a4e8..b1b432c33062 100644 --- a/keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h +++ b/keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h @@ -58,6 +58,6 @@ /* PMW3360 settings. */ #define A1 PAL_LINE(GPIOA, 1) -#define PMW33XX_CS_PIN A1 +#define POINTING_DEVICE_CS_PIN A1 #define PMW3360_CS_MODE 3 #define PMW3360_CS_DIVISOR 64 diff --git a/keyboards/bastardkb/charybdis/4x6/v2/stemcell/rules.mk b/keyboards/bastardkb/charybdis/4x6/v2/stemcell/rules.mk index 4905c8d61bdc..0847e9ce1fa9 100644 --- a/keyboards/bastardkb/charybdis/4x6/v2/stemcell/rules.mk +++ b/keyboards/bastardkb/charybdis/4x6/v2/stemcell/rules.mk @@ -28,7 +28,6 @@ SPLIT_KEYBOARD = yes POINTING_DEVICE_ENABLE = yes # Enable trackball POINTING_DEVICE_DRIVER = pmw3360 -# https://qmk.fm/changes/2018-11-16-use-a-single-endpoint-for-hid-reports MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint KEYBOARD_SHARED_EP = yes diff --git a/keyboards/bastardkb/dilemma/3x5_2/assembled/config.h b/keyboards/bastardkb/dilemma/3x5_2/assembled/config.h index f16b876e2028..8420898f4edc 100644 --- a/keyboards/bastardkb/dilemma/3x5_2/assembled/config.h +++ b/keyboards/bastardkb/dilemma/3x5_2/assembled/config.h @@ -38,7 +38,7 @@ #define SPI_SCK_PIN GP22 #define SPI_MOSI_PIN GP23 #define SPI_MISO_PIN GP20 -#define CIRQUE_PINNACLE_SPI_CS_PIN GP21 +#define POINTING_DEVICE_CS_PIN GP21 /* Reset. */ #define RP2040_BOOTLOADER_DOUBLE_TAP_RESET diff --git a/keyboards/bastardkb/dilemma/3x5_3/config.h b/keyboards/bastardkb/dilemma/3x5_3/config.h index 060cf312715c..275a58fce39b 100644 --- a/keyboards/bastardkb/dilemma/3x5_3/config.h +++ b/keyboards/bastardkb/dilemma/3x5_3/config.h @@ -17,8 +17,6 @@ #pragma once -#include "dilemma/config.h" - /* Key matrix configuration. */ #define MATRIX_ROW_PINS \ { GP4, GP5, GP27, GP26 } @@ -43,11 +41,11 @@ #define SPI_SCK_PIN GP22 #define SPI_MOSI_PIN GP23 #define SPI_MISO_PIN GP20 -#define CIRQUE_PINNACLE_SPI_CS_PIN GP21 +#define POINTING_DEVICE_CS_PIN GP21 /* OLED over i2c. */ #define I2C1_CLOCK_SPEED 400000 -#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 +#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9 #define OLED_DISPLAY_HEIGHT 128 /* Reset. */ diff --git a/keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/keymap.c b/keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/keymap.c index c8a241c3b15b..e8e5ccd83b0f 100644 --- a/keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/keymap.c +++ b/keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/keymap.c @@ -199,8 +199,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // clang-format on #if defined(POINTING_DEVICE_ENABLE) && defined(DILEMMA_AUTO_SNIPING_ON_LAYER) -layer_state_t layer_state_set_kb(layer_state_t state) { - state = layer_state_set_user(state); +layer_state_t layer_state_set_user(layer_state_t state) { dilemma_set_pointer_sniping_enabled(layer_state_cmp(state, DILEMMA_AUTO_SNIPING_ON_LAYER)); return state; }