NetBurner 3.5.0
PDF Version
 
HiResDelay.h
Go to the documentation of this file.
1/*NB_REVISION*/
2
3/*NB_COPYRIGHT*/
4
34#ifndef _NB_DELAY_TIMER_H
35#define _NB_DELAY_TIMER_H
36
37#include <constants.h>
38#include <nbrtos.h>
60{
61 private:
62 OS_SEM WakeObject; // Semaphore for internal ISR use
63 int TimerNumber; // Timer number used by the delay object
64 void *MiscHardwarePtr; // Pointer to timer hardwae registers
65
66 public:
75
81 void DelayUsec(uint32_t usec);
82
89 bool valid() { return TimerNumber >= 0; }
90
91 // Internal use only for ISR processing.
92 inline void _wake() { WakeObject.Post(); }
93};
94
95#endif
96
Microsecond Delay Class.
Definition HiResDelay.h:60
bool valid()
Verify a valid delay object was constructed.
Definition HiResDelay.h:89
void DelayUsec(uint32_t usec)
Microsecond Delay Timer.
DelayObject(int Timer=FIRST_UNUSED_TIMER)
Microsecond Delay Timer Constructor.
NetBurner System Constants.
#define FIRST_UNUSED_TIMER
Definition nbrtos/include/constants.h:396
NetBurner Real-Time Operating System (NBRTOS) API.
Semaphores are used to control access to shared resources or or to communicate between tasks in a mul...
Definition nbrtos.h:386
uint8_t Post()
Posts to the semaphore, increasing it's value by 1.