X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Finclude%2Ftimer.h;h=d9eee7a328555e25d09ad46334bd7c9266a41f9e;hb=d3dc8751ff73ea50016a19bb7940c894fc3539aa;hp=1b9d1c17f74f00f73eb92a57b5764555e43403f7;hpb=a73a0c24ea59bb035857da45a3a41febd1783668;p=carl9170fw.git diff --git a/carlfw/include/timer.h b/carlfw/include/timer.h index 1b9d1c1..d9eee7a 100644 --- a/carlfw/include/timer.h +++ b/carlfw/include/timer.h @@ -50,6 +50,11 @@ static inline __inline bool is_after_msecs(const uint32_t t0, const uint32_t mse return ((get_clock_counter() - t0) / 1000) > (msecs * fw.ticks_per_usec); } +static inline __inline bool is_after_usecs(const uint32_t t0, const uint32_t usecs) +{ + return ((get_clock_counter() - t0)) > (usecs * fw.ticks_per_usec); +} + /* * Note: Be careful with [u]delay. They won't service the * hardware watchdog timer. It might trigger if you