From b29b40165e93891b1786e4061435c6eee9c8a2c5 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Fri, 4 Dec 2015 03:16:31 +0300 Subject: [PATCH] STM32: exposed getMonotonic() and getUtc() in order to discourage direct access to uavcan_stm32::clock --- .../stm32/driver/include/uavcan_stm32/clock.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp index eeceaf3d77..1f422f02dd 100644 --- a/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp +++ b/libuavcan_drivers/stm32/driver/include/uavcan_stm32/clock.hpp @@ -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.