aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Challis <git@zvecr.com>2021-02-05 13:27:24 +0000
committerGitHub <noreply@github.com>2021-02-05 13:27:24 +0000
commitb2d0e8a491f347d43b482808a744642fc975afab (patch)
tree177e05eab66844bb029829df75611106cccb37cb
parent18babeae49dc933f7a07e123241ae2a78a75f168 (diff)
downloadqmk_firmware-b2d0e8a491f347d43b482808a744642fc975afab.tar.gz
qmk_firmware-b2d0e8a491f347d43b482808a744642fc975afab.zip
Manually run formatting job (#11797)
-rw-r--r--quantum/pointing_device.c11
-rw-r--r--quantum/quantum.c4
-rw-r--r--tmk_core/common/keyboard.c12
3 files changed, 8 insertions, 19 deletions
diff --git a/quantum/pointing_device.c b/quantum/pointing_device.c
index fbcc08e6d..09d889f69 100644
--- a/quantum/pointing_device.c
+++ b/quantum/pointing_device.c
@@ -25,14 +25,7 @@ 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)) bool has_mouse_report_changed(report_mouse_t new, report_mouse_t old) { 28__attribute__((weak)) bool has_mouse_report_changed(report_mouse_t new, report_mouse_t old) { return (new.buttons != old.buttons) || (new.x&& new.x != old.x) || (new.y&& new.y != old.y) || (new.h&& new.h != old.h) || (new.v&& new.v != old.v); }
29 return (new.buttons != old.buttons) ||
30 (new.x && new.x != old.x) ||
31 (new.y && new.y != old.y) ||
32 (new.h && new.h != old.h) ||
33 (new.v && new.v != old.v);
34}
35
36 29
37__attribute__((weak)) void pointing_device_init(void) { 30__attribute__((weak)) void pointing_device_init(void) {
38 // initialize device, if that needs to be done. 31 // initialize device, if that needs to be done.
@@ -50,7 +43,7 @@ __attribute__((weak)) void pointing_device_send(void) {
50 mouseReport.y = 0; 43 mouseReport.y = 0;
51 mouseReport.v = 0; 44 mouseReport.v = 0;
52 mouseReport.h = 0; 45 mouseReport.h = 0;
53 old_report = mouseReport; 46 old_report = mouseReport;
54} 47}
55 48
56__attribute__((weak)) void pointing_device_task(void) { 49__attribute__((weak)) void pointing_device_task(void) {
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 71a05d387..cf16e953a 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -697,9 +697,7 @@ void send_byte(uint8_t number) {
697 send_nibble(number & 0xF); 697 send_nibble(number & 0xF);
698} 698}
699 699
700void send_nibble(uint8_t number) { 700void send_nibble(uint8_t number) { tap_code16(hex_to_keycode(number)); }
701 tap_code16(hex_to_keycode(number));
702}
703 701
704__attribute__((weak)) uint16_t hex_to_keycode(uint8_t hex) { 702__attribute__((weak)) uint16_t hex_to_keycode(uint8_t hex) {
705 hex = hex & 0xF; 703 hex = hex & 0xF;
diff --git a/tmk_core/common/keyboard.c b/tmk_core/common/keyboard.c
index f4e9b1184..7120cdacd 100644
--- a/tmk_core/common/keyboard.c
+++ b/tmk_core/common/keyboard.c
@@ -98,8 +98,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
98 98
99// Only enable this if console is enabled to print to 99// Only enable this if console is enabled to print to
100#if defined(DEBUG_MATRIX_SCAN_RATE) 100#if defined(DEBUG_MATRIX_SCAN_RATE)
101static uint32_t matrix_timer = 0; 101static uint32_t matrix_timer = 0;
102static uint32_t matrix_scan_count = 0; 102static uint32_t matrix_scan_count = 0;
103static uint32_t last_matrix_scan_count = 0; 103static uint32_t last_matrix_scan_count = 0;
104 104
105void matrix_scan_perf_task(void) { 105void matrix_scan_perf_task(void) {
@@ -111,14 +111,12 @@ void matrix_scan_perf_task(void) {
111 dprintf("matrix scan frequency: %lu\n", matrix_scan_count); 111 dprintf("matrix scan frequency: %lu\n", matrix_scan_count);
112# endif 112# endif
113 last_matrix_scan_count = matrix_scan_count; 113 last_matrix_scan_count = matrix_scan_count;
114 matrix_timer = timer_now; 114 matrix_timer = timer_now;
115 matrix_scan_count = 0; 115 matrix_scan_count = 0;
116 } 116 }
117} 117}
118 118
119uint32_t get_matrix_scan_rate(void) { 119uint32_t get_matrix_scan_rate(void) { return last_matrix_scan_count; }
120 return last_matrix_scan_count;
121}
122#else 120#else
123# define matrix_scan_perf_task() 121# define matrix_scan_perf_task()
124#endif 122#endif