mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 23:57:46 +00:00
[time-sync] remove reference operator in C API (#3833)
This commit is contained in:
@@ -84,7 +84,7 @@ typedef void (*otNetworkTimeSyncCallbackFn)(void *aCallbackContext);
|
||||
* @returns The time synchronization status.
|
||||
*
|
||||
*/
|
||||
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t &aNetworkTime);
|
||||
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTime);
|
||||
|
||||
/**
|
||||
* Set the time synchronization period.
|
||||
|
||||
+1
-1
@@ -1865,7 +1865,7 @@ void Interpreter::ProcessNetworkTime(int argc, char *argv[])
|
||||
uint64_t time;
|
||||
otNetworkTimeStatus networkTimeStatus;
|
||||
|
||||
networkTimeStatus = otNetworkTimeGet(mInstance, time);
|
||||
networkTimeStatus = otNetworkTimeGet(mInstance, &time);
|
||||
|
||||
mServer->OutputFormat("Network Time: %luus", time);
|
||||
|
||||
|
||||
@@ -42,11 +42,11 @@
|
||||
|
||||
using namespace ot;
|
||||
|
||||
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t &aNetworkTime)
|
||||
otNetworkTimeStatus otNetworkTimeGet(otInstance *aInstance, uint64_t *aNetworkTime)
|
||||
{
|
||||
Instance &instance = *static_cast<Instance *>(aInstance);
|
||||
|
||||
return instance.Get<TimeSync>().GetTime(aNetworkTime);
|
||||
return instance.Get<TimeSync>().GetTime(*aNetworkTime);
|
||||
}
|
||||
|
||||
otError otNetworkTimeSetSyncPeriod(otInstance *aInstance, uint16_t aTimeSyncPeriod)
|
||||
|
||||
@@ -3182,7 +3182,7 @@ template <> otError NcpBase::HandlePropertyGet<SPINEL_PROP_THREAD_NETWORK_TIME>(
|
||||
otNetworkTimeStatus networkTimeStatus;
|
||||
uint64_t time;
|
||||
|
||||
networkTimeStatus = otNetworkTimeGet(mInstance, time);
|
||||
networkTimeStatus = otNetworkTimeGet(mInstance, &time);
|
||||
|
||||
SuccessOrExit(error = mEncoder.WriteUint64(time));
|
||||
SuccessOrExit(error = mEncoder.WriteInt8((int8_t)networkTimeStatus));
|
||||
|
||||
Reference in New Issue
Block a user