aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2020-04-11 00:48:16 +0000
committerQMK Bot <hello@qmk.fm>2020-04-11 00:48:16 +0000
commitcc38627816b343a2909d50dd0e059daa5986cff9 (patch)
treee14847f2ae4a1c2e46a378fb3728452532e76db5 /quantum
parent6c2c3c13e903296e6c7b30e56571034ec175d889 (diff)
downloadqmk_firmware-cc38627816b343a2909d50dd0e059daa5986cff9.tar.gz
qmk_firmware-cc38627816b343a2909d50dd0e059daa5986cff9.zip
format code according to conventions [skip ci]
Diffstat (limited to 'quantum')
-rw-r--r--quantum/debounce/eager_pk.c10
-rw-r--r--quantum/debounce/eager_pr.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/quantum/debounce/eager_pk.c b/quantum/debounce/eager_pk.c
index 467689224..6fa956bf3 100644
--- a/quantum/debounce/eager_pk.c
+++ b/quantum/debounce/eager_pk.c
@@ -45,12 +45,12 @@ static bool matrix_need_update;
45#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) 45#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
46 46
47static uint8_t wrapping_timer_read(void) { 47static uint8_t wrapping_timer_read(void) {
48 static uint16_t time = 0; 48 static uint16_t time = 0;
49 static uint8_t last_result = 0; 49 static uint8_t last_result = 0;
50 uint16_t new_time = timer_read(); 50 uint16_t new_time = timer_read();
51 uint16_t diff = new_time - time; 51 uint16_t diff = new_time - time;
52 time = new_time; 52 time = new_time;
53 last_result = (last_result + diff) % (MAX_DEBOUNCE + 1); 53 last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
54 return last_result; 54 return last_result;
55} 55}
56 56
diff --git a/quantum/debounce/eager_pr.c b/quantum/debounce/eager_pr.c
index 41843aedb..d12931fdd 100644
--- a/quantum/debounce/eager_pr.c
+++ b/quantum/debounce/eager_pr.c
@@ -37,12 +37,12 @@ static bool counters_need_update;
37#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1) 37#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
38 38
39static uint8_t wrapping_timer_read(void) { 39static uint8_t wrapping_timer_read(void) {
40 static uint16_t time = 0; 40 static uint16_t time = 0;
41 static uint8_t last_result = 0; 41 static uint8_t last_result = 0;
42 uint16_t new_time = timer_read(); 42 uint16_t new_time = timer_read();
43 uint16_t diff = new_time - time; 43 uint16_t diff = new_time - time;
44 time = new_time; 44 time = new_time;
45 last_result = (last_result + diff) % (MAX_DEBOUNCE + 1); 45 last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
46 return last_result; 46 return last_result;
47} 47}
48 48