summaryrefslogtreecommitdiff
path: root/keyboards/handwired/tractyl_manuform
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/handwired/tractyl_manuform')
-rw-r--r--keyboards/handwired/tractyl_manuform/4x6_right/config.h4
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h4
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h8
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h8
-rw-r--r--keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h4
-rw-r--r--keyboards/handwired/tractyl_manuform/tractyl_manuform.c27
6 files changed, 22 insertions, 33 deletions
diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/config.h
index ab46bc5276..5bfb17ee31 100644
--- a/keyboards/handwired/tractyl_manuform/4x6_right/config.h
+++ b/keyboards/handwired/tractyl_manuform/4x6_right/config.h
@@ -85,7 +85,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-/* PMW3360 Settings */
-#define PMW3360_CS_PIN B0
+/* PMW33XX Settings */
+#define PMW33XX_CS_PIN B0
#define POINTING_DEVICE_RIGHT
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h
index d8d36e824c..ab72957b5c 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/elite_c/config.h
@@ -47,5 +47,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENCODERS_PAD_B \
{ C7 }
-/* PMW3360 Settings */
-#define PMW3360_CS_PIN B6
+/* PMW33XX Settings */
+#define PMW33XX_CS_PIN B6
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h
index f9a44587b0..bf7f2c7605 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f303/config.h
@@ -25,9 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
{ B0, B1, B2, B3, B4, B5 }
#define MATRIX_ROW_PINS \
{ B10, B11, B12, A14, A13, A15 }
-
-#define UNUSED_PINS \
- { A0, A2, A7, A8 }
// B2 used for BOOT1, has internal pull down?
// A9 has internal pull-down
// A11 and A12 are used for USB sense. DO NOT USE.
@@ -99,6 +96,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define DEBUG_EEPROM_OUTPUT
/* pmw3360 config */
-#define PMW3360_CS_PIN B9
-#define PMW3360_SPI_MODE 3
-#define PMW3360_SPI_DIVISOR 8
+#define PMW33XX_CS_PIN B9
+#define PMW33XX_SPI_DIVISOR 8
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
index 5f0350810c..b31f450553 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/f411/config.h
@@ -26,9 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROW_PINS \
{ B12, B13, B14, B15, A8, A10 }
-#define UNUSED_PINS \
- { C15 }
-
#define DIODE_DIRECTION COL2ROW
// #define USB_VBUS_PIN B10 // doesn't seem to work for me on one of my controllers... */
@@ -102,7 +99,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define EXTERNAL_EEPROM_SPI_CLOCK_DIVISOR 64
/* pmw3360 config */
-#define PMW3360_CS_PIN B0
-#define PMW3360_SPI_MODE 3
-#define PMW3360_SPI_DIVISOR 64
-#define PMW3360_FIRMWARE_UPLOAD_FAST
+#define PMW33XX_CS_PIN B0
diff --git a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h
index 442d474920..6eb3186332 100644
--- a/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h
+++ b/keyboards/handwired/tractyl_manuform/5x6_right/teensy2pp/config.h
@@ -51,5 +51,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define ENCODERS_PAD_B \
{ D4 }
-/* PMW3360 Settings */
-#define PMW3360_CS_PIN B0
+/* PMW33XX Settings */
+#define PMW33XX_CS_PIN B0
diff --git a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
index 0ae49b6397..d3e2e02975 100644
--- a/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
+++ b/keyboards/handwired/tractyl_manuform/tractyl_manuform.c
@@ -159,10 +159,8 @@ void charybdis_set_pointer_dragscroll_enabled(bool enable) {
maybe_update_pointing_device_cpi(&g_charybdis_config);
}
-void pointing_device_init_kb(void) { maybe_update_pointing_device_cpi(&g_charybdis_config); }
-
# ifndef CONSTRAIN_HID
-# define CONSTRAIN_HID(value) ((value) < -127 ? -127 : ((value) > 127 ? 127 : (value)))
+# define CONSTRAIN_HID(value) ((value) < XY_REPORT_MIN ? XY_REPORT_MIN : ((value) > XY_REPORT_MAX ? XY_REPORT_MAX : (value)))
# endif // !CONSTRAIN_HID
/**
@@ -249,17 +247,17 @@ static bool has_shift_mod(void) {
*/
__attribute__((unused)) static void debug_charybdis_config_to_console(charybdis_config_t* config) {
# ifdef CONSOLE_ENABLE
- dprintf("(charybdis) process_record_kb: config = {\n"
- "\traw = 0x%04X,\n"
- "\t{\n"
- "\t\tis_dragscroll_enabled=%b\n"
- "\t\tis_sniping_enabled=%b\n"
- "\t\tdefault_dpi=0x%02X (%ld)\n"
- "\t\tsniping_dpi=0x%01X (%ld)\n"
- "\t}\n"
- "}\n",
- config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config));
-# endif // CONSOLE_ENABLE
+ IGNORE_FORMAT_WARNING(dprintf("(charybdis) process_record_kb: config = {\n"
+ "\traw = 0x%04X,\n"
+ "\t{\n"
+ "\t\tis_dragscroll_enabled=%b\n"
+ "\t\tis_sniping_enabled=%b\n"
+ "\t\tdefault_dpi=0x%02X (%ld)\n"
+ "\t\tsniping_dpi=0x%01X (%ld)\n"
+ "\t}\n"
+ "}\n",
+ config->raw, config->is_dragscroll_enabled, config->is_sniping_enabled, config->pointer_default_dpi, get_pointer_default_dpi(config), config->pointer_sniping_dpi, get_pointer_sniping_dpi(config)));
+# endif // CONSOLE_ENABLE
}
bool process_record_kb(uint16_t keycode, keyrecord_t* record) {
@@ -339,6 +337,7 @@ void charybdis_config_sync_handler(uint8_t initiator2target_buffer_size, const v
}
void keyboard_post_init_kb(void) {
+ maybe_update_pointing_device_cpi(&g_charybdis_config);
transaction_register_rpc(RPC_ID_KB_CONFIG_SYNC, charybdis_config_sync_handler);
keyboard_post_init_user();