NetBurner 3.5.6
PDF Version
HiResDelay.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
92#ifndef _NB_DELAY_TIMER_H
93#define _NB_DELAY_TIMER_H
94
95#include <constants.h>
96#include <nbrtos.h>
97
164{
165 private:
170 OS_SEM WakeObject;
171
176 int TimerNumber;
177
182 void *MiscHardwarePtr;
183
184 public:
214 DelayObject(int Timer = FIRST_UNUSED_TIMER);
215
226
270 void DelayUsec(uint32_t usec);
271
318 bool valid() { return TimerNumber >= 0; }
319
332 inline void _wake() { WakeObject.Post(); }
333};
334
335#endif // _NB_DELAY_TIMER_H
336
337 // End of groupHighResDelayTimer
High-resolution microsecond delay timer class.
Definition HiResDelay.h:164
bool valid()
Verify the delay object is valid and ready to use.
Definition HiResDelay.h:318
void DelayUsec(uint32_t usec)
Perform a blocking delay with microsecond precision.
DelayObject(int Timer=FIRST_UNUSED_TIMER)
Construct a high-resolution delay timer object.
void _wake()
Internal ISR callback to wake blocked task (internal use only)
Definition HiResDelay.h:332
~DelayObject()
Destructor - releases the allocated hardware timer.