mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-21 21:58:05 -06:00
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>
This commit is contained in:
parent
7eda55e2b0
commit
b28e95ca1a
29 changed files with 33 additions and 33 deletions
|
@ -36,7 +36,7 @@ static const uint8_t adc_pins[] PROGMEM = {
|
|||
enum { ADMUX_DEFAULT = 0x40 };
|
||||
enum { ADC_ENABLE = (1<<ADPS0)|(1<<ADPS1)|(1<<ADPS2)|(1<<ADEN)|(1<<ADIF) };
|
||||
|
||||
DECL_CONSTANT(ADC_MAX, 1023);
|
||||
DECL_CONSTANT("ADC_MAX", 1023);
|
||||
|
||||
struct gpio_adc
|
||||
gpio_adc_setup(uint8_t pin)
|
||||
|
|
|
@ -74,7 +74,7 @@ static const struct gpio_pwm_info pwm_regs[] PROGMEM = {
|
|||
#endif
|
||||
};
|
||||
|
||||
DECL_CONSTANT(PWM_MAX, 255);
|
||||
DECL_CONSTANT("PWM_MAX", 255);
|
||||
|
||||
struct gpio_pwm
|
||||
gpio_pwm_setup(uint8_t pin, uint32_t cycle_time, uint8_t val)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include "irq.h" // irq_enable
|
||||
#include "sched.h" // sched_main
|
||||
|
||||
DECL_CONSTANT(MCU, CONFIG_MCU);
|
||||
DECL_CONSTANT_STR("MCU", CONFIG_MCU);
|
||||
|
||||
|
||||
/****************************************************************
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* Low level timer code
|
||||
****************************************************************/
|
||||
|
||||
DECL_CONSTANT(CLOCK_FREQ, CONFIG_CLOCK_FREQ);
|
||||
DECL_CONSTANT("CLOCK_FREQ", CONFIG_CLOCK_FREQ);
|
||||
|
||||
// Return the number of clock ticks for a given number of microseconds
|
||||
uint32_t
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue