add SoftwareTimer setID/getID
This commit is contained in:
1 parent
d65f1cd720
commit
25232734f9
2 files changed
+13
No files matched your search
@@ -39,6 +39,16 @@ void SoftwareTimer::begin(uint32_t ms, TimerCallbackFunction_t callback, void* t
|
||||
_handle = xTimerCreate(NULL, ms2tick(ms), repeating, timerID, callback);
|
||||
}
|
||||
|
||||
void SoftwareTimer::setID(void* id)
|
||||
{
|
||||
vTimerSetTimerID(_handle, id);
|
||||
}
|
||||
|
||||
void* SoftwareTimer::getID(void)
|
||||
{
|
||||
return pvTimerGetTimerID(_handle);
|
||||
}
|
||||
|
||||
bool SoftwareTimer::start(void)
|
||||
{
|
||||
bool ret = true;
|
||||
|
||||
@@ -50,6 +50,9 @@ class SoftwareTimer
|
||||
void begin(uint32_t ms, TimerCallbackFunction_t callback, void* timerID = NULL, bool repeating = true);
|
||||
TimerHandle_t getHandle(void) { return _handle; }
|
||||
|
||||
void setID(void* id);
|
||||
void* getID(void);
|
||||
|
||||
bool start(void);
|
||||
bool stop (void);
|
||||
bool reset (void);
|
||||
|
||||
Reference in new issue
Block a user