X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Finclude%2Ftimer.h;h=d9eee7a328555e25d09ad46334bd7c9266a41f9e;hb=c35adcdbad76fb1c0f657b14b8111493f9c8ed73;hp=1b9d1c17f74f00f73eb92a57b5764555e43403f7;hpb=dbb81597c39e9ecf9a76420ac374a179d5b94c91;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