1
0
Fork 0

Run cformat and dos2unix manually (#11235)

This commit is contained in:
Ryan 2020-12-18 01:06:30 +11:00 committed by GitHub
parent d9dcb716bf
commit 6ea4b06f9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 550 additions and 570 deletions

View file

@ -38,12 +38,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;
}