summaryrefslogtreecommitdiff
path: root/quantum/debounce
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/debounce
parent6c2c3c13e903296e6c7b30e56571034ec175d889 (diff)
format code according to conventions [skip ci]
Diffstat (limited to 'quantum/debounce')
-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 4676892243..6fa956bf3b 100644
--- a/quantum/debounce/eager_pk.c
+++ b/quantum/debounce/eager_pk.c
@@ -45,12 +45,12 @@ static bool matrix_need_update;
#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
static uint8_t wrapping_timer_read(void) {
- static uint16_t time = 0;
+ static uint16_t time = 0;
static uint8_t last_result = 0;
- uint16_t new_time = timer_read();
- uint16_t diff = new_time - time;
- time = new_time;
- last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
+ uint16_t new_time = timer_read();
+ uint16_t diff = new_time - time;
+ time = new_time;
+ last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
return last_result;
}
diff --git a/quantum/debounce/eager_pr.c b/quantum/debounce/eager_pr.c
index 41843aedbc..d12931fddb 100644
--- a/quantum/debounce/eager_pr.c
+++ b/quantum/debounce/eager_pr.c
@@ -37,12 +37,12 @@ static bool counters_need_update;
#define MAX_DEBOUNCE (DEBOUNCE_ELAPSED - 1)
static uint8_t wrapping_timer_read(void) {
- static uint16_t time = 0;
+ static uint16_t time = 0;
static uint8_t last_result = 0;
- uint16_t new_time = timer_read();
- uint16_t diff = new_time - time;
- time = new_time;
- last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
+ uint16_t new_time = timer_read();
+ uint16_t diff = new_time - time;
+ time = new_time;
+ last_result = (last_result + diff) % (MAX_DEBOUNCE + 1);
return last_result;
}