From 4f788c2ae90583f64e0cec6545a3da75a5aff0f8 Mon Sep 17 00:00:00 2001 From: XScorpion2 Date: Sat, 1 Jun 2019 16:39:31 -0500 Subject: [Keymap] Xulkal user changes (#6044) * Xulkal user changes Xulkal user changes * Reduce code duplication * Massive user code refactor --- users/xulkal/timer_utils.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 users/xulkal/timer_utils.c (limited to 'users/xulkal/timer_utils.c') diff --git a/users/xulkal/timer_utils.c b/users/xulkal/timer_utils.c new file mode 100644 index 0000000000..5f5d9a1ebf --- /dev/null +++ b/users/xulkal/timer_utils.c @@ -0,0 +1,12 @@ +#include "timer_utils.h" + +bool timer_expired(uint16_t last) +{ + return timer_read() - last < 0x8000; +} + +bool timer_expired32(uint32_t last) +{ + return timer_read32() - last < 0x80000000; +} + -- cgit v1.2.3