From fe95ea221b2b88e9cb52a6378ff2018ee752094b Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Thu, 22 Dec 2016 23:47:46 -0500 Subject: build: Define DECL_CONSTANT mechanism for defining exported constants Add a DECL_CONSTANT macro to allow the firmware to define constants that are to be exported to the host during the "identify" phase. This replaces the existing hardcoded mechanism of scanning the Kconfig header file for certain constants. Signed-off-by: Kevin O'Connor --- src/avr/timer.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/avr/timer.c') diff --git a/src/avr/timer.c b/src/avr/timer.c index a7e832bc..3744351d 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -16,6 +16,9 @@ * Low level timer code ****************************************************************/ +DECL_CONSTANT(CLOCK_FREQ, F_CPU); +DECL_CONSTANT(MCU, CONFIG_MCU); + // Return the number of clock ticks for a given number of microseconds uint32_t timer_from_us(uint32_t us) -- cgit v1.2.3-70-g09d2