NetBurner 3.5.7
PDF Version
HiResDelay.h
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
144#ifndef _NB_DELAY_TIMER_H
145#define _NB_DELAY_TIMER_H
146
147#include <constants.h>
148#include <nbrtos.h>
149
216{
217 private:
222 OS_SEM WakeObject;
223
228 int TimerNumber;
229
234 void *MiscHardwarePtr;
235
236 public:
266 DelayObject(int Timer = FIRST_UNUSED_TIMER);
267
278
337 void DelayUsec(uint32_t usec);
338
385 bool valid() { return TimerNumber >= 0; }
386
399 inline void _wake() { WakeObject.Post(); }
400};
401
402#endif // _NB_DELAY_TIMER_H
403
404 // End of groupHighResDelayTimer
High-resolution microsecond delay timer class.
Definition HiResDelay.h:216
bool valid()
Verify the delay object is valid and ready to use.
Definition HiResDelay.h:385
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:399
~DelayObject()
Destructor - releases the allocated hardware timer.
Semaphores are used to control access to shared resources or or to communicate between tasks in a mul...
Definition nbrtos.h:407
uint8_t Post()
Posts to the semaphore, increasing it's value by 1.