Skip to content

Commit

Permalink
Address code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
0xcharly committed Oct 30, 2022
1 parent 1f646ec commit c636e2a
Show file tree
Hide file tree
Showing 21 changed files with 22 additions and 28 deletions.
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x5/blackpill/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x5/v1/elitec/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
#define RGB_DI_PIN D3

/* PMW3360 settings. */
#define PMW33XX_CS_PIN B0
#define POINTING_DEVICE_CS_PIN B0
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x5/v2/elitec/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
#define RGB_DI_PIN D3

/* PMW3360 settings. */
#define PMW33XX_CS_PIN F0
#define POINTING_DEVICE_CS_PIN F0
4 changes: 2 additions & 2 deletions keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x5/v2/stemcell/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/3x5/v2/stemcell/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x6/blackpill/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x6/v1/elitec/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@
#define RGB_DI_PIN D3

/* PMW3360 settings. */
#define PMW33XX_CS_PIN B0
#define POINTING_DEVICE_CS_PIN B0
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x6/v2/elitec/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
#define RGB_DI_PIN D3

/* PMW3360 settings. */
#define PMW33XX_CS_PIN F0
#define POINTING_DEVICE_CS_PIN F0
4 changes: 2 additions & 2 deletions keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/3x6/v2/stemcell/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/3x6/v2/stemcell/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/4x6/blackpill/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/4x6/v1/elitec/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@
#define RGB_DI_PIN D3

/* PMW3360 settings. */
#define PMW33XX_CS_PIN B0
#define POINTING_DEVICE_CS_PIN B0
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/4x6/v2/elitec/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@
#define RGB_DI_PIN D3

/* PMW3360 settings. */
#define PMW33XX_CS_PIN F0
#define POINTING_DEVICE_CS_PIN F0
4 changes: 2 additions & 2 deletions keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/charybdis/4x6/v2/stemcell/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion keyboards/bastardkb/charybdis/4x6/v2/stemcell/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion keyboards/bastardkb/dilemma/3x5_2/assembled/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions keyboards/bastardkb/dilemma/3x5_3/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@

#pragma once

#include "dilemma/config.h"

/* Key matrix configuration. */
#define MATRIX_ROW_PINS \
{ GP4, GP5, GP27, GP26 }
Expand All @@ -44,11 +42,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. */
Expand Down
3 changes: 1 addition & 2 deletions keyboards/bastardkb/dilemma/3x5_3/keymaps/bstiq/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c636e2a

Please sign in to comment.