From 30b2dbe369b3a61d1d6681b0a689dbcdd41fc221 Mon Sep 17 00:00:00 2001 From: Charly Delay <0xcharly@users.noreply.github.com> Date: Tue, 15 Nov 2022 17:51:44 +0900 Subject: Bastard Keyboards: upstream recent changes (#18903) * bastardkb: cleanup blackpill configuration Fixes #17 * bastardkb: fix splinky configuration 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 * bastardkb: add support for STeMCell * Update scylla/tbkmini/skeletyl outdated readmes * bastardkb/dilemma: enable circular scroll * bastardkb/dilemma: add initial version of the `via` keymap * bastardkb/dilemma/assembled: add new keyboard Fixes #20 * bastardkb/dilemma: remove elite-c * Initial support for the Dilemma 3x5+3 Assembled RGB * Address code review comments * Address more comments * Address review comments * Address more nits * bastardkb: split splinky-based keyboards to distinguish between Splinky v2 and v3 pinout --- keyboards/bastardkb/dilemma/dilemma.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'keyboards/bastardkb/dilemma/dilemma.c') diff --git a/keyboards/bastardkb/dilemma/dilemma.c b/keyboards/bastardkb/dilemma/dilemma.c index e710f3aab7..793f27d2b5 100644 --- a/keyboards/bastardkb/dilemma/dilemma.c +++ b/keyboards/bastardkb/dilemma/dilemma.c @@ -1,4 +1,4 @@ -/* +/** * Copyright 2020 Christopher Courtney (@drashna) * Copyright 2021 Quentin LEBASTARD * Copyright 2022 Charly Delay (@0xcharly) @@ -316,7 +316,7 @@ bool process_record_kb(uint16_t keycode, keyrecord_t* record) { void eeconfig_init_kb(void) { g_dilemma_config.raw = 0; - g_dilemma_config.pointer_default_dpi = 4; + g_dilemma_config.pointer_default_dpi = 3; // DPI=1000 write_dilemma_config_to_eeprom(&g_dilemma_config); maybe_update_pointing_device_cpi(&g_dilemma_config); eeconfig_init_user(); @@ -327,3 +327,17 @@ void matrix_init_kb(void) { matrix_init_user(); } #endif // POINTING_DEVICE_ENABLE + +// Forward declare RP2040 SDK declaration. +void gpio_init(uint gpio); + +void keyboard_pre_init_user(void) { + // Ensures that GP26 through GP29 are initialized as digital inputs (as + // opposed to analog inputs). These GPIOs are shared with A0 through A3, + // respectively. On RP2040-B2 and later, the digital inputs are disabled by + // default (see RP2040-E6). + gpio_init(GP26); + gpio_init(GP27); + gpio_init(GP28); + gpio_init(GP29); +} -- cgit v1.2.3