Skip to content

Commit

Permalink
bastardkb/charybdis: fix splinky configuration
Browse files Browse the repository at this point in the history
The pinout of the splinky changed between the last beta batch, and the
production one. This commit updates the keyboard definition to support
the new pinout by default, while offering backward compatibility.

Define `SPLINKY_BETA_PINOUT` to build the firmware with pre-production
pinout.

Fixes #15
  • Loading branch information
Charly Delay committed Sep 11, 2022
1 parent ee9ca3e commit 04b79fc
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 15 deletions.
21 changes: 16 additions & 5 deletions keyboards/bastardkb/charybdis/3x5/v2/splinky/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
/* Key matrix configuration. */
#define MATRIX_ROW_PINS \
{ GP26, GP5, GP4, GP9 }
#define MATRIX_COL_PINS \
{ GP28, GP15, GP6, GP7, GP8 }
#ifdef SPLINKY_BETA_PINOUT
# define MATRIX_COL_PINS \
{ GP28, GP15, GP6, GP7, GP8 }
#else
# define MATRIX_COL_PINS \
{ GP28, GP21, GP6, GP7, GP8 }
#endif // SPLINKY_BETA_PINOUT

/* Handedness. */
#define MASTER_RIGHT
Expand All @@ -39,10 +44,16 @@

/* SPI & PMW3360 settings. */
#define SPI_DRIVER SPID0
#define SPI_SCK_PIN GP18
#define SPI_MOSI_PIN GP19
#define SPI_MISO_PIN GP20
#define PMW33XX_CS_PIN GP14
#ifdef SPLINKY_BETA_PINOUT
# define SPI_SCK_PIN GP18
# define SPI_MOSI_PIN GP19
# define PMW33XX_CS_PIN GP14
#else
# define SPI_SCK_PIN GP22
# define SPI_MOSI_PIN GP23
# define PMW33XX_CS_PIN GP16
#endif // SPLINKY_BETA_PINOUT

/* Reset. */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
Expand Down
21 changes: 16 additions & 5 deletions keyboards/bastardkb/charybdis/3x6/v2/splinky/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
/* Key matrix configuration. */
#define MATRIX_ROW_PINS \
{ GP26, GP5, GP4, GP9 }
#define MATRIX_COL_PINS \
{ GP27, GP28, GP15, GP6, GP7, GP8 }
#ifdef SPLINKY_BETA_PINOUT
# define MATRIX_COL_PINS \
{ GP27, GP28, GP15, GP6, GP7, GP8 }
#else
# define MATRIX_COL_PINS \
{ GP27, GP28, GP21, GP6, GP7, GP8 }
#endif // SPLINKY_BETA_PINOUT

/* Handedness. */
#define MASTER_RIGHT
Expand All @@ -39,10 +44,16 @@

/* SPI & PMW3360 settings. */
#define SPI_DRIVER SPID0
#define SPI_SCK_PIN GP18
#define SPI_MOSI_PIN GP19
#define SPI_MISO_PIN GP20
#define PMW33XX_CS_PIN GP14
#ifdef SPLINKY_BETA_PINOUT
# define SPI_SCK_PIN GP18
# define SPI_MOSI_PIN GP19
# define PMW33XX_CS_PIN GP14
#else
# define SPI_SCK_PIN GP22
# define SPI_MOSI_PIN GP23
# define PMW33XX_CS_PIN GP16
#endif // SPLINKY_BETA_PINOUT

/* Reset. */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
Expand Down
21 changes: 16 additions & 5 deletions keyboards/bastardkb/charybdis/4x6/v2/splinky/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@
/* Key matrix configuration. */
#define MATRIX_ROW_PINS \
{ GP29, GP26, GP5, GP4, GP9 }
#define MATRIX_COL_PINS \
{ GP27, GP28, GP15, GP6, GP7, GP8 }
#ifdef SPLINKY_BETA_PINOUT
# define MATRIX_COL_PINS \
{ GP27, GP28, GP15, GP6, GP7, GP8 }
#else
# define MATRIX_COL_PINS \
{ GP27, GP28, GP21, GP6, GP7, GP8 }
#endif // SPLINKY_BETA_PINOUT

/* Handedness. */
#define MASTER_RIGHT
Expand All @@ -39,10 +44,16 @@

/* SPI & PMW3360 settings. */
#define SPI_DRIVER SPID0
#define SPI_SCK_PIN GP18
#define SPI_MOSI_PIN GP19
#define SPI_MISO_PIN GP20
#define PMW33XX_CS_PIN GP14
#ifdef SPLINKY_BETA_PINOUT
# define SPI_SCK_PIN GP18
# define SPI_MOSI_PIN GP19
# define PMW33XX_CS_PIN GP14
#else
# define SPI_SCK_PIN GP22
# define SPI_MOSI_PIN GP23
# define PMW33XX_CS_PIN GP16
#endif // SPLINKY_BETA_PINOUT

/* Reset. */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
Expand Down

0 comments on commit 04b79fc

Please sign in to comment.