mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-16 11:17:52 -06:00
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 <kevin@koconnor.net>
This commit is contained in:
parent
4e8674d5df
commit
fe95ea221b
11 changed files with 54 additions and 37 deletions
|
@ -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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue