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/serial.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/avr/serial.c') diff --git a/src/avr/serial.c b/src/avr/serial.c index bd92f048..6bd88598 100644 --- a/src/avr/serial.c +++ b/src/avr/serial.c @@ -9,6 +9,7 @@ #include "autoconf.h" // CONFIG_SERIAL_BAUD #include "board/io.h" // readb #include "board/misc.h" // console_get_input +#include "command.h" // DECL_CONSTANT #include "sched.h" // DECL_INIT #include "irq.h" // irq_save @@ -22,6 +23,8 @@ static uint8_t transmit_pos, transmit_max; * Serial hardware ****************************************************************/ +DECL_CONSTANT(SERIAL_BAUD, CONFIG_SERIAL_BAUD); + static void serial_init(void) { -- cgit v1.2.3-70-g09d2