Classes | Functions
uavcan_kinetis::clock Namespace Reference

Classes

struct  UtcSyncParams
 

Functions

void adjustUtc (uavcan::UtcDuration adjustment)
 
uavcan::MonotonicTime getMonotonic ()
 
uavcan::UtcTime getUtc ()
 
uavcan::uint32_t getUtcJumpCount ()
 
float getUtcRateCorrectionPPM ()
 
UtcSyncParams getUtcSyncParams ()
 
uavcan::uint64_t getUtcUSecFromCanInterrupt ()
 
void init ()
 
bool isUtcLocked ()
 
void setUtc (uavcan::UtcTime time)
 
void setUtcSyncParams (const UtcSyncParams &params)
 

Function Documentation

◆ adjustUtc()

void uavcan_kinetis::clock::adjustUtc ( uavcan::UtcDuration  adjustment)

Performs UTC phase and frequency adjustment. The UTC time will be zero until first adjustment has been performed. This function is thread safe.

Performs UTC time adjustment. The UTC time will be zero until first adjustment has been performed.

Definition at line 117 of file clock.cpp.

◆ getMonotonic()

uavcan::MonotonicTime uavcan_kinetis::clock::getMonotonic ( )

Returns current monotonic time since the moment when clock::init() was called. This function is thread safe.

Returns current monotonic time passed since the moment when clock::init() was called. Note that both monotonic and UTC clocks are implemented using SysTick timer.

Definition at line 83 of file clock.cpp.

◆ getUtc()

uavcan::UtcTime uavcan_kinetis::clock::getUtc ( )

Returns UTC time if it has been set, otherwise returns zero time. This function is thread safe.

Returns UTC time if it has been set, otherwise returns zero time. Note that both monotonic and UTC clocks are implemented using SysTick timer.

Definition at line 97 of file clock.cpp.

◆ getUtcJumpCount()

uavcan::uint32_t uavcan_kinetis::clock::getUtcJumpCount ( )

Number of non-gradual adjustments performed so far. Ideally should be zero. This function is thread safe.

◆ getUtcRateCorrectionPPM()

float uavcan_kinetis::clock::getUtcRateCorrectionPPM ( )

Clock rate error. Positive if the hardware timer is slower than reference time. This function is thread safe.

◆ getUtcSyncParams()

UtcSyncParams uavcan_kinetis::clock::getUtcSyncParams ( )

UTC sync params get/set. Both functions are thread safe.

◆ getUtcUSecFromCanInterrupt()

uavcan::uint64_t uavcan_kinetis::clock::getUtcUSecFromCanInterrupt ( )

Definition at line 78 of file clock.cpp.

◆ init()

void uavcan_kinetis::clock::init ( )

Starts the clock. Can be called multiple times, only the first call will be effective.

Definition at line 43 of file clock.cpp.

◆ isUtcLocked()

bool uavcan_kinetis::clock::isUtcLocked ( )

Whether UTC is synchronized and locked. This function is thread safe.

◆ setUtc()

void uavcan_kinetis::clock::setUtc ( uavcan::UtcTime  time)

Sets the driver's notion of the system UTC. It should be called at startup and any time the system clock is updated from an external source that is not the UAVCAN Timesync master. This function is thread safe.

◆ setUtcSyncParams()

void uavcan_kinetis::clock::setUtcSyncParams ( const UtcSyncParams params)


uavcan_communicator
Author(s):
autogenerated on Fri Dec 13 2024 03:10:05