Skip to content

Commit

Permalink
helper for easier timer arming
Browse files Browse the repository at this point in the history
  • Loading branch information
MightyPork committed Aug 24, 2017
1 parent 3237c6f commit 566e95a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/esp8266.h
Expand Up @@ -32,3 +32,9 @@
#include "logging.h"
#include "platform.h"
#include "espmissingincludes.h"

#define TIMER_START(pTimer, func, ms, repeated) do { \
os_timer_disarm((pTimer)); \
os_timer_setfn((pTimer), (func), NULL); \
os_timer_arm((pTimer), (ms), (repeated)); \
} while (0)

0 comments on commit 566e95a

Please sign in to comment.