X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=carlfw%2Finclude%2Ftimer.h;h=f15e6fbdca33ef10ba596b96d8aad86383a82cf9;hb=1a0ab91a746487301a30ecef2b2f95d40527f3da;hp=1b9d1c17f74f00f73eb92a57b5764555e43403f7;hpb=33a5b694bb3a09b4b0c4ed57c18926f831bf2c42;p=carl9170fw.git diff --git a/carlfw/include/timer.h b/carlfw/include/timer.h index 1b9d1c1..f15e6fb 100644 --- a/carlfw/include/timer.h +++ b/carlfw/include/timer.h @@ -19,8 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * with this program; If not, see . */ #ifndef __CARL9170FW_TIMER_H @@ -50,6 +49,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