mirror of
https://github.com/espressif/openthread.git
synced 2026-09-09 10:40:09 +00:00
[nexus] implement microsecond alarm platform APIs (#12580)
This commit implements the otPlatAlarmMicro* platform APIs in the Nexus simulation environment. It also transitions the simulation's internal time base from millisecond to microsecond granularity to ensure that both millisecond and microsecond alarms operate on a consistent and shared time reference. Changes include: - Enabled OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE in Nexus config. - Updated Nexus::Core to use a 64-bit microsecond time base (mNow). - Implemented otPlatAlarmMicroGetNow, otPlatAlarmMicroStartAt, and otPlatAlarmMicroStop. - Refactored Nexus::Node to support separate millisecond and microsecond alarm instances (mAlarmMilli and mAlarmMicro). - Updated radio timestamps and PCAP logging to use the new high- resolution microsecond time base. - Adjusted simulation time advancement and alarm triggering logic to handle both alarm types correctly.
This commit is contained in:
@@ -38,7 +38,8 @@ void Node::Reset(void)
|
||||
uint32_t id = GetId();
|
||||
|
||||
mRadio.Reset();
|
||||
mAlarm.Reset();
|
||||
mAlarmMilli.Reset();
|
||||
mAlarmMicro.Reset();
|
||||
mMdns.Reset();
|
||||
mPendingTasklet = false;
|
||||
#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE
|
||||
|
||||
Reference in New Issue
Block a user