summaryrefslogtreecommitdiffstats
path: root/keyboards/bastardkb/dilemma/dilemma.c
diff options
context:
space:
mode:
authorCharly Delay <0xcharly@users.noreply.github.com>2022-11-15 17:51:44 +0900
committerGitHub <noreply@github.com>2022-11-15 08:51:44 +0000
commit30b2dbe369b3a61d1d6681b0a689dbcdd41fc221 (patch)
treecddf4e7318c2b06d33d4b3750d2e4eb15f1d2333 /keyboards/bastardkb/dilemma/dilemma.c
parentee7426e7b19c25ddfc53d0b50db68a457d8f992b (diff)
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
Diffstat (limited to 'keyboards/bastardkb/dilemma/dilemma.c')
-rw-r--r--keyboards/bastardkb/dilemma/dilemma.c18
1 files changed, 16 insertions, 2 deletions
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@live.com> (@drashna)
* Copyright 2021 Quentin LEBASTARD <qlebastard@gmail.com>
* Copyright 2022 Charly Delay <charly@codesink.dev> (@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);
+}