summaryrefslogtreecommitdiff
path: root/keyboards
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@drashna.net>2023-04-01 11:01:46 -0700
committerGitHub <noreply@github.com>2023-04-01 19:01:46 +0100
commitbf986579dd6b0d503e8b7de18858e0713cd9c20b (patch)
tree5c6c8a2bd0358e13f76ba490c527e0528d0cce96 /keyboards
parent9359504255236cce74c601554783ac5ce6f44fa9 (diff)
Fixup Pointing device functions (#20311)
Diffstat (limited to 'keyboards')
-rw-r--r--keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c4
-rw-r--r--keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c4
-rwxr-xr-xkeyboards/dichotomy/dichotomy.c4
-rwxr-xr-xkeyboards/keyhive/honeycomb/honeycomb.c4
-rw-r--r--keyboards/molecule/adns.c6
-rw-r--r--keyboards/splitkb/kyria/keymaps/gotham/thumbstick.c4
6 files changed, 13 insertions, 13 deletions
diff --git a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c
index c4f4a0441a..a6661cdc07 100644
--- a/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c
+++ b/keyboards/3w6/rev2/keymaps/default_pimoroni/pimoroni_trackball.c
@@ -115,7 +115,7 @@ void trackball_set_scrolling(bool scroll) { scrolling = scroll; }
__attribute__((weak)) void pointing_device_init(void) { trackball_set_rgbw(0x80, 0x00, 0x00, 0x00); }
-void pointing_device_task(void) {
+bool pointing_device_task(void) {
static bool debounce;
static uint16_t debounce_timer;
uint8_t state[5] = {};
@@ -173,5 +173,5 @@ void pointing_device_task(void) {
update_member(&mouse.v, &h_offset);
#endif
pointing_device_set_report(mouse);
- pointing_device_send();
+ return pointing_device_send();
}
diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c b/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c
index afccb8c7ed..4dc336c420 100644
--- a/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c
+++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.c
@@ -43,7 +43,7 @@ uint8_t readRegister(uint8_t address) {
return data;
}
-void pointing_device_task(void){
+bool pointing_device_task(void){
uint8_t motion = readRegister(0x02);
// Motion has occurred on the trackpad
@@ -73,6 +73,6 @@ void pointing_device_task(void){
}
pointing_device_set_report(currentReport);
- pointing_device_send();
}
+ return pointing_device_send();
}
diff --git a/keyboards/dichotomy/dichotomy.c b/keyboards/dichotomy/dichotomy.c
index afd52cc8b3..4301d9b67d 100755
--- a/keyboards/dichotomy/dichotomy.c
+++ b/keyboards/dichotomy/dichotomy.c
@@ -2,7 +2,7 @@
//#include "uart.h"
-void pointing_device_task(void){
+bool pointing_device_task(void){
/*report_mouse_t currentReport = {};
uint32_t timeout = 0;
@@ -56,7 +56,7 @@ void pointing_device_task(void){
} else {
xprintf("\r\nRequested packet, data 4 was %d",uart_data[4]);
}*/
- pointing_device_send();
+ return pointing_device_send();
}
void led_init(void) {
diff --git a/keyboards/keyhive/honeycomb/honeycomb.c b/keyboards/keyhive/honeycomb/honeycomb.c
index 603400c7a3..6acc649e0d 100755
--- a/keyboards/keyhive/honeycomb/honeycomb.c
+++ b/keyboards/keyhive/honeycomb/honeycomb.c
@@ -2,7 +2,7 @@
#include "pointing_device.h"
#include "report.h"
-void pointing_device_task(void){
+bool pointing_device_task(void){
/*report_mouse_t currentReport = {};
uint32_t timeout = 0;
@@ -56,7 +56,7 @@ void pointing_device_task(void){
} else {
xprintf("\r\nRequested packet, data 4 was %d",uart_data[4]);
}*/
- pointing_device_send();
+ return pointing_device_send();
}
void led_init(void) {
diff --git a/keyboards/molecule/adns.c b/keyboards/molecule/adns.c
index be40cf7ea7..96fc83ee0b 100644
--- a/keyboards/molecule/adns.c
+++ b/keyboards/molecule/adns.c
@@ -237,11 +237,11 @@ motion_delta_t readSensor(void) {
return delta;
}
-void pointing_device_task(void) {
+bool pointing_device_task(void) {
motion_delta_t delta = readSensor();
report_mouse_t report = pointing_device_get_report();
-
+
if(delta.motion_ind) {
// clamp deltas from -127 to 127
report.x = delta.delta_x < -127 ? -127 : delta.delta_x > 127 ? 127 : delta.delta_x;
@@ -250,5 +250,5 @@ void pointing_device_task(void) {
}
pointing_device_set_report(report);
- pointing_device_send();
+ return pointing_device_send();
}
diff --git a/keyboards/splitkb/kyria/keymaps/gotham/thumbstick.c b/keyboards/splitkb/kyria/keymaps/gotham/thumbstick.c
index ec08fb07d4..bb307b149f 100644
--- a/keyboards/splitkb/kyria/keymaps/gotham/thumbstick.c
+++ b/keyboards/splitkb/kyria/keymaps/gotham/thumbstick.c
@@ -146,7 +146,7 @@ void update_keycode_status(uint16_t keycode, bool last, bool current) {
void pointing_device_init(void) { thumbstick_init(); }
-void pointing_device_task(void) {
+bool pointing_device_task(void) {
report_mouse_t report = pointing_device_get_report();
if (!isLeftHand) {
@@ -191,5 +191,5 @@ void pointing_device_task(void) {
}
pointing_device_set_report(report);
- pointing_device_send();
+ return pointing_device_send();
}