mirror of
https://github.com/espressif/openthread.git
synced 2026-08-10 04:37:47 +00:00
[timer] multiple microseconds timer support (#1962)
* [timer] multiple microseconds timer support * Remove TimerSchedulerLocator, Timer inherit from Ip6Locator instead to get TimerScheduler. * Add separate UsecTimer and UsecTimerScheduler for multiple microseconds timer support. * [timer] refine Timer names * Rename alarm header files to alarm-milli.h and alarm-micro.h * Rename alarm APIs to start with otPlatAlarmMilli and otPlatAlarmMicro * Rename Timer classes to TimerMilli/TimerMilliScheduler and TimerMicro/TimerMicroScheduler * [Timer] Refactor Timer code structure * Create TimerBase and TimerSchedulerBase class for common functions; * Use TimerMilli/TimerMicro and TimerMilliScheduler/TimerMicroScheduler for different functions; * Define AlarmApi, so then TimerMilliScheduler/TimerMicroScheduler could use different AlarmApi.
This commit is contained in:
@@ -135,7 +135,7 @@ extern "C" {
|
||||
// Alarm
|
||||
//
|
||||
|
||||
void otPlatAlarmStop(otInstance *aInstance)
|
||||
void otPlatAlarmMilliStop(otInstance *aInstance)
|
||||
{
|
||||
if (g_testPlatAlarmStop)
|
||||
{
|
||||
@@ -147,7 +147,7 @@ extern "C" {
|
||||
}
|
||||
}
|
||||
|
||||
void otPlatAlarmStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
|
||||
void otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
|
||||
{
|
||||
if (g_testPlatAlarmStartAt)
|
||||
{
|
||||
@@ -160,7 +160,7 @@ extern "C" {
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t otPlatAlarmGetNow(void)
|
||||
uint32_t otPlatAlarmMilliGetNow(void)
|
||||
{
|
||||
if (g_testPlatAlarmGetNow)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user