aboutsummaryrefslogtreecommitdiff
path: root/quantum/pointing_device.c
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2019-08-30 11:19:03 -0700
committerskullydazed <skullydazed@users.noreply.github.com>2019-08-30 15:01:52 -0700
commitb624f32f944acdc59dcb130674c09090c5c404cb (patch)
treebc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /quantum/pointing_device.c
parent61af76a10d00aba185b8338604171de490a13e3b (diff)
downloadqmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.tar.gz
qmk_firmware-b624f32f944acdc59dcb130674c09090c5c404cb.zip
clang-format changes
Diffstat (limited to 'quantum/pointing_device.c')
-rw-r--r--quantum/pointing_device.c45
1 files changed, 19 insertions, 26 deletions
diff --git a/quantum/pointing_device.c b/quantum/pointing_device.c
index e60ae8d93..24a487b9a 100644
--- a/quantum/pointing_device.c
+++ b/quantum/pointing_device.c
@@ -25,38 +25,31 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
25 25
26static report_mouse_t mouseReport = {}; 26static report_mouse_t mouseReport = {};
27 27
28__attribute__ ((weak)) 28__attribute__((weak)) void pointing_device_init(void) {
29void pointing_device_init(void){ 29 // initialize device, if that needs to be done.
30 //initialize device, if that needs to be done.
31} 30}
32 31
33__attribute__ ((weak)) 32__attribute__((weak)) void pointing_device_send(void) {
34void pointing_device_send(void){ 33 // If you need to do other things, like debugging, this is the place to do it.
35 //If you need to do other things, like debugging, this is the place to do it.
36 host_mouse_send(&mouseReport); 34 host_mouse_send(&mouseReport);
37 //send it and 0 it out except for buttons, so those stay until they are explicity over-ridden using update_pointing_device 35 // send it and 0 it out except for buttons, so those stay until they are explicity over-ridden using update_pointing_device
38 mouseReport.x = 0; 36 mouseReport.x = 0;
39 mouseReport.y = 0; 37 mouseReport.y = 0;
40 mouseReport.v = 0; 38 mouseReport.v = 0;
41 mouseReport.h = 0; 39 mouseReport.h = 0;
42} 40}
43 41
44__attribute__ ((weak)) 42__attribute__((weak)) void pointing_device_task(void) {
45void pointing_device_task(void){ 43 // gather info and put it in:
46 //gather info and put it in: 44 // mouseReport.x = 127 max -127 min
47 //mouseReport.x = 127 max -127 min 45 // mouseReport.y = 127 max -127 min
48 //mouseReport.y = 127 max -127 min 46 // mouseReport.v = 127 max -127 min (scroll vertical)
49 //mouseReport.v = 127 max -127 min (scroll vertical) 47 // mouseReport.h = 127 max -127 min (scroll horizontal)
50 //mouseReport.h = 127 max -127 min (scroll horizontal) 48 // mouseReport.buttons = 0x1F (decimal 31, binary 00011111) max (bitmask for mouse buttons 1-5, 1 is rightmost, 5 is leftmost) 0x00 min
51 //mouseReport.buttons = 0x1F (decimal 31, binary 00011111) max (bitmask for mouse buttons 1-5, 1 is rightmost, 5 is leftmost) 0x00 min 49 // send the report
52 //send the report
53 pointing_device_send(); 50 pointing_device_send();
54} 51}
55 52
56report_mouse_t pointing_device_get_report(void){ 53report_mouse_t pointing_device_get_report(void) { return mouseReport; }
57 return mouseReport;
58}
59 54
60void pointing_device_set_report(report_mouse_t newMouseReport){ 55void pointing_device_set_report(report_mouse_t newMouseReport) { mouseReport = newMouseReport; } \ No newline at end of file
61 mouseReport = newMouseReport;
62} \ No newline at end of file