STM32: exposed getMonotonic() and getUtc() in order to discourage direct access to uavcan_stm32::clock

This commit is contained in:
Pavel Kirienko
2015-12-04 03:16:31 +03:00
parent 82d161ee61
commit b29b40165e
@@ -105,11 +105,12 @@ class SystemClock : public uavcan::ISystemClock, uavcan::Noncopyable
{
SystemClock() { }
virtual uavcan::MonotonicTime getMonotonic() const { return clock::getMonotonic(); }
virtual uavcan::UtcTime getUtc() const { return clock::getUtc(); }
virtual void adjustUtc(uavcan::UtcDuration adjustment) { clock::adjustUtc(adjustment); }
public:
virtual uavcan::MonotonicTime getMonotonic() const { return clock::getMonotonic(); }
virtual uavcan::UtcTime getUtc() const { return clock::getUtc(); }
/**
* Calls clock::init() as needed.
* This function is thread safe.