From efa92aaed21cbaa80f4bc88a0ef9bb6bbb7aa3ee Mon Sep 17 00:00:00 2001 From: gdisirio Date: Wed, 4 Jan 2012 08:46:11 +0000 Subject: Realtime counter support in the generic HAL driver and implementations for al STM32 devices, others will follow. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3723 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/hal/include/hal.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) (limited to 'os/hal/include') diff --git a/os/hal/include/hal.h b/os/hal/include/hal.h index 8d7214325..6c49e2c5c 100644 --- a/os/hal/include/hal.h +++ b/os/hal/include/hal.h @@ -52,6 +52,46 @@ #include "serial_usb.h" #include "rtc.h" +/*===========================================================================*/ +/* Driver constants. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver pre-compile time settings. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Derived constants and error checks. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver data structures and types. */ +/*===========================================================================*/ + +/*===========================================================================*/ +/* Driver macros. */ +/*===========================================================================*/ + +/** + * @brief Returns the current value of the system free running counter. + * @note This is an optional service that could not be implemented in + * all HAL implementations. + * + * @return The value of the system free running counter. + * + * @api + */ +#define halGetCounterValue() hal_lld_get_counter_value() + +/** + * @brief Realtime counter frequency. + * + * @return The realtime counter frequency of type halclock_t. + * + * @api + */ +#define halGetCounterFrequency() hal_lld_get_counter_frequency() + /*===========================================================================*/ /* External declarations. */ /*===========================================================================*/ -- cgit v1.2.3