diff options
author | root <root@lamia.panaceas.james.local> | 2015-06-13 13:08:23 +0100 |
---|---|---|
committer | root <root@lamia.panaceas.james.local> | 2015-06-13 13:08:23 +0100 |
commit | cd568297a41e5a6f2e130de82c07b6b789d34f4b (patch) | |
tree | a8ac2021e11d8a33d178fa521bde323c819e4c8d /app/ticker.c | |
parent | 162fcd3f8d879615dc39181daea95ef6fcb83752 (diff) | |
download | tims_keyboard-cd568297a41e5a6f2e130de82c07b6b789d34f4b.tar.gz tims_keyboard-cd568297a41e5a6f2e130de82c07b6b789d34f4b.tar.bz2 tims_keyboard-cd568297a41e5a6f2e130de82c07b6b789d34f4b.zip |
add usb wakeup support, all keys up on bad data, and resend for parity errors
Diffstat (limited to 'app/ticker.c')
-rw-r--r-- | app/ticker.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/ticker.c b/app/ticker.c index e3ff474..2c0d532 100644 --- a/app/ticker.c +++ b/app/ticker.c @@ -43,6 +43,17 @@ timed_out (uint32_t then, unsigned int ms) return 0; } +int +timed_out_cycles (uint32_t then, unsigned int cycles) +{ + then = dwt_read_cycle_counter () - then; + + if (then > cycles) + return 1; + return 0; +} + + void ticker_init (void) |