diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-12-22 23:47:46 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-12-23 17:06:10 -0500 |
commit | fe95ea221b2b88e9cb52a6378ff2018ee752094b (patch) | |
tree | 2223d604cc7d5bdf2c771b05e15834dd418b3823 /src/sam3x8e/timer.c | |
parent | 4e8674d5df46841e68b72b83911b28ec71079bf1 (diff) | |
download | kutter-fe95ea221b2b88e9cb52a6378ff2018ee752094b.tar.gz kutter-fe95ea221b2b88e9cb52a6378ff2018ee752094b.tar.xz kutter-fe95ea221b2b88e9cb52a6378ff2018ee752094b.zip |
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>
Diffstat (limited to 'src/sam3x8e/timer.c')
-rw-r--r-- | src/sam3x8e/timer.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/sam3x8e/timer.c b/src/sam3x8e/timer.c index ead9c90f..0d3728ed 100644 --- a/src/sam3x8e/timer.c +++ b/src/sam3x8e/timer.c @@ -16,6 +16,9 @@ * Low level timer code ****************************************************************/ +DECL_CONSTANT(CLOCK_FREQ, CONFIG_CLOCK_FREQ); +DECL_CONSTANT(MCU, "sam3x8e"); + // Return the number of clock ticks for a given number of microseconds uint32_t timer_from_us(uint32_t us) |