diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-03-04 23:35:11 -0500 |
---|---|---|
committer | KevinOConnor <kevin@koconnor.net> | 2019-03-17 19:38:18 -0400 |
commit | b28e95ca1aa2860c0869041c29a3ba27054e5967 (patch) | |
tree | b507c6a45c52fff68a449f20213d39b6bc8e4a29 /src/atsam | |
parent | 7eda55e2b042566020ade34d7b2cdb9296f37f1d (diff) | |
download | kutter-b28e95ca1aa2860c0869041c29a3ba27054e5967.tar.gz kutter-b28e95ca1aa2860c0869041c29a3ba27054e5967.tar.xz kutter-b28e95ca1aa2860c0869041c29a3ba27054e5967.zip |
command: Always pass a string to the DECL_CONSTANT() macro
Make it clear that the name of the constant being defined is a string.
When the value being defined is also a string, use a new
DECL_CONSTANT_STR() macro.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/atsam')
-rw-r--r-- | src/atsam/adc.c | 2 | ||||
-rw-r--r-- | src/atsam/hard_pwm.c | 2 | ||||
-rw-r--r-- | src/atsam/main.c | 2 | ||||
-rw-r--r-- | src/atsam/sam4e_afec.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/src/atsam/adc.c b/src/atsam/adc.c index d5e74676..816b388e 100644 --- a/src/atsam/adc.c +++ b/src/atsam/adc.c @@ -27,7 +27,7 @@ static const uint8_t adc_pins[] = { }; #define ADC_FREQ_MAX 20000000 -DECL_CONSTANT(ADC_MAX, 4095); +DECL_CONSTANT("ADC_MAX", 4095); struct gpio_adc gpio_adc_setup(uint8_t pin) diff --git a/src/atsam/hard_pwm.c b/src/atsam/hard_pwm.c index 7d1881a6..0b238b24 100644 --- a/src/atsam/hard_pwm.c +++ b/src/atsam/hard_pwm.c @@ -54,7 +54,7 @@ static const struct gpio_pwm_info pwm_regs[] = { #define MAX_PWM 255 -DECL_CONSTANT(PWM_MAX, MAX_PWM); +DECL_CONSTANT("PWM_MAX", MAX_PWM); struct gpio_pwm gpio_pwm_setup(uint8_t pin, uint32_t cycle_time, uint8_t val) diff --git a/src/atsam/main.c b/src/atsam/main.c index b6be2864..0bb9ff83 100644 --- a/src/atsam/main.c +++ b/src/atsam/main.c @@ -10,7 +10,7 @@ #include "internal.h" // WDT #include "sched.h" // sched_main -DECL_CONSTANT(MCU, CONFIG_MCU); +DECL_CONSTANT_STR("MCU", CONFIG_MCU); /**************************************************************** diff --git a/src/atsam/sam4e_afec.c b/src/atsam/sam4e_afec.c index 002e092f..4c78e958 100644 --- a/src/atsam/sam4e_afec.c +++ b/src/atsam/sam4e_afec.c @@ -51,7 +51,7 @@ gpio_adc_to_afec_chan(struct gpio_adc g) } #define ADC_FREQ_MAX 6000000UL -DECL_CONSTANT(ADC_MAX, 4095); +DECL_CONSTANT("ADC_MAX", 4095); static int init_afec(Afec* afec) { |