summaryrefslogtreecommitdiff
path: root/keyboards/bastardkb/dilemma/dilemma.c
diff options
context:
space:
mode:
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);
+}