21 #ifndef COSA_WATCHDOG_HH 22 #define COSA_WATCHDOG_HH 52 __attribute__((always_inline))
55 synchronized res = s_millis;
66 synchronized s_millis = ms;
75 return (s_ms_per_tick);
84 static void begin(uint16_t ms = 16);
91 static void delay(uint32_t ms);
97 __attribute__((always_inline))
108 static uint32_t
since(uint32_t start)
109 __attribute__((always_inline))
112 return (now - start);
137 Watchdog::s_scheduler =
this;
169 return (s_scheduler);
183 Watchdog::s_clock =
this;
194 synchronized s_clock =
clock;
207 static bool s_initiated;
208 static uint32_t s_millis;
209 static uint16_t s_ms_per_tick;
212 static Clock* s_clock;
224 static uint8_t as_prescale(uint16_t ms);
static uint16_t ms_per_tick()
static uint32_t since(uint32_t start)
friend void WDT_vect(void)
static void millis(uint32_t ms)
static void begin(uint16_t ms=16)
static Watchdog::Scheduler * scheduler()
static void wall(Clock *clock)
static void job(Watchdog::Scheduler *scheduler)
static bool is_initiated()
static void delay(uint32_t ms)