summaryrefslogtreecommitdiffstats
path: root/keyboards/bastardkb/dilemma/dilemma.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-11-15 08:52:19 +0000
committerQMK Bot <hello@qmk.fm>2022-11-15 08:52:19 +0000
commit4238d49efe7d1fc461864dd57bbdf22a157e7f59 (patch)
tree4d612e45b7ef7e99f261565856eecf365d10a17f /keyboards/bastardkb/dilemma/dilemma.c
parent1a3f2130d5feeeccada90ebb1d96cde5232459e0 (diff)
parent30b2dbe369b3a61d1d6681b0a689dbcdd41fc221 (diff)
Merge remote-tracking branch 'origin/master' into develop
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);
+}