libuav original

Dependents:   UAVCAN UAVCAN_Subscriber

Embed: (wiki syntax)

« Back to documentation index

uavcan_lpc11c24::clock Namespace Reference

uavcan_lpc11c24::clock Namespace Reference

Internal for the driver. More...

Namespaces

namespace  anonymous_namespace{clock.cpp}

Functions

void init ()
 Starts the clock.
uavcan::MonotonicTime getMonotonic ()
 Returns current monotonic time passed since the moment when clock::init() was called.
uavcan::UtcTime getUtc ()
 Returns UTC time if it has been set, otherwise returns zero time.
void adjustUtc (uavcan::UtcDuration adjustment)
 Performs UTC time adjustment.
uavcan::UtcDuration getPrevUtcAdjustment ()
 Returns clock error sampled at previous UTC adjustment.

Detailed Description

Internal for the driver.


Function Documentation

void adjustUtc ( uavcan::UtcDuration  adjustment )

Performs UTC time adjustment.

Performs UTC phase and frequency adjustment.

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

Definition at line 117 of file clock.cpp.

uavcan::MonotonicTime getMonotonic (  )

Returns current monotonic time passed since the moment when clock::init() was called.

Returns current monotonic time 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.

uavcan::UtcDuration getPrevUtcAdjustment (  )

Returns clock error sampled at previous UTC adjustment.

Positive if the hardware timer is slower than reference time.

Definition at line 112 of file clock.cpp.

uavcan::UtcTime getUtc (  )

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.

void init (  )

Starts the clock.

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

Definition at line 43 of file clock.cpp.