add timer ID support to software timer
This commit is contained in:
1 parent
54c87e8f29
commit
33857e9ed3
2 files changed
+3
-3
No files matched your search
@@ -34,9 +34,9 @@ SoftwareTimer::~SoftwareTimer ()
|
||||
if ( _handle != NULL ) xTimerDelete(_handle, 0);
|
||||
}
|
||||
|
||||
void SoftwareTimer::begin(uint32_t ms, TimerCallbackFunction_t callback, bool repeating)
|
||||
void SoftwareTimer::begin(uint32_t ms, TimerCallbackFunction_t callback, void* timerID, bool repeating)
|
||||
{
|
||||
_handle = xTimerCreate(NULL, ms2tick(ms), repeating, NULL, callback);
|
||||
_handle = xTimerCreate(NULL, ms2tick(ms), repeating, timerID, callback);
|
||||
}
|
||||
|
||||
bool SoftwareTimer::start(void)
|
||||
|
||||
@@ -47,7 +47,7 @@ class SoftwareTimer
|
||||
SoftwareTimer();
|
||||
virtual ~SoftwareTimer();
|
||||
|
||||
void begin(uint32_t ms, TimerCallbackFunction_t callback, bool repeating = true);
|
||||
void begin(uint32_t ms, TimerCallbackFunction_t callback, void* timerID = NULL, bool repeating = true);
|
||||
TimerHandle_t getHandle(void) { return _handle; }
|
||||
|
||||
bool start(void);
|
||||
|
||||
Reference in new issue
Block a user