Bastardkb / bastardkb-qmk

Open-source keyboard firmware for Atmel AVR and Arm USB families
https://qmk.fm
82 stars 107 forks source link

Update Splinky configs #15

Closed 0xcharly closed 2 years ago

0xcharly commented 2 years ago

Pinout was adjusted in the latest revision to match the standard rp-2040-based boards pinout:

/* Key matrix configuration. */
#define MATRIX_ROW_PINS \
  { GP26, GP5, GP4, GP9 }
#define MATRIX_COL_PINS \
  { GP28, GP21, GP6, GP7, GP8 }

/* Handedness. */
#define MASTER_RIGHT
// To use the handedness pin, resistors need to be installed on the adapter PCB.
// If so, uncomment the following code, and undefine MASTER_RIGHT above.
// #define SPLIT_HAND_PIN GP13
// #define SPLIT_HAND_PIN_LOW_IS_LEFT // High -> right, Low -> left.

/* serial.c configuration (for split keyboard). */
#define SOFT_SERIAL_PIN GP1

/* RGB settings. */
#define RGB_DI_PIN GP0

/* SPI & PMW3360 settings. */
#define SPI_DRIVER SPID0
#define SPI_SCK_PIN GP22
#define SPI_MOSI_PIN GP23
#define SPI_MISO_PIN GP20
#define PMW3360_CS_PIN GP16

/* Reset. */
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_LED GP17
#define RP2040_BOOTLOADER_DOUBLE_TAP_RESET_TIMEOUT 1000U
0xcharly commented 2 years ago

Add a compile time flag to keep backward compatibility with the previous gen.

harmonicoscillator commented 2 years ago

I have a 3x5 charybdis with beta splinkys and I'm trying to figure out how to properly set the compile-time flag SPLINKY_BETA_PINOUT in my keymap.

I am building on top of the bkb-develop branch. Adding #define SPLINKY_BETA_PINOUT to my keymap's config.h does NOT work, the non-beta pinout still gets picked. I'm not super familiar with the order of config-file loading in QMK, do I need to set that define somewhere else outside of my keymap config.h file?

For reference, I have my keymap in the folder qmk_firmware/keyboards/bastardkb/charybdis/3x5/keymaps/alex-miryoku/. I use the following compile command to generate the keymap:

qmk compile -kb bastardkb/charybdis/3x5/v2/splinky -km alex-miryoku
0xcharly commented 2 years ago

Hi,

You can see the order in which config.h and rules.mk files are evaluated here: https://docs.qmk.fm/#/hardware_keyboard_guidelines?id=configh.

To fix your specific issue, can you try adding this to your keymap's rules.mk:

OPT_DEFS += -DSPLINKY_BETA_PINOUT

?

Thanks!