aboutsummaryrefslogtreecommitdiffstats
path: root/src/linux
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-03-04 23:35:11 -0500
committerKevinOConnor <kevin@koconnor.net>2019-03-17 19:38:18 -0400
commitb28e95ca1aa2860c0869041c29a3ba27054e5967 (patch)
treeb507c6a45c52fff68a449f20213d39b6bc8e4a29 /src/linux
parent7eda55e2b042566020ade34d7b2cdb9296f37f1d (diff)
downloadkutter-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/linux')
-rw-r--r--src/linux/analog.c2
-rw-r--r--src/linux/main.c2
-rw-r--r--src/linux/pca9685.c2
-rw-r--r--src/linux/timer.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/linux/analog.c b/src/linux/analog.c
index 990f6c4a..5011f531 100644
--- a/src/linux/analog.c
+++ b/src/linux/analog.c
@@ -13,7 +13,7 @@
#include "internal.h" // report_errno
#include "sched.h" // sched_shutdown
-DECL_CONSTANT(ADC_MAX, 4095); // Assume 12bit adc
+DECL_CONSTANT("ADC_MAX", 4095); // Assume 12bit adc
#define IIO_PATH "/sys/bus/iio/devices/iio:device0/in_voltage%d_raw"
diff --git a/src/linux/main.c b/src/linux/main.c
index f351ec1f..4c5478eb 100644
--- a/src/linux/main.c
+++ b/src/linux/main.c
@@ -13,7 +13,7 @@
#include "internal.h" // console_setup
#include "sched.h" // sched_main
-DECL_CONSTANT(MCU, "linux");
+DECL_CONSTANT_STR("MCU", "linux");
/****************************************************************
diff --git a/src/linux/pca9685.c b/src/linux/pca9685.c
index 0b9ff73d..14eefb15 100644
--- a/src/linux/pca9685.c
+++ b/src/linux/pca9685.c
@@ -136,7 +136,7 @@ struct i2cpwm_s {
uint32_t max_duration;
};
-DECL_CONSTANT(PCA9685_MAX, VALUE_MAX);
+DECL_CONSTANT("PCA9685_MAX", VALUE_MAX);
static uint_fast8_t
pca9685_end_event(struct timer *timer)
diff --git a/src/linux/timer.c b/src/linux/timer.c
index faf6a5d2..15e5ab76 100644
--- a/src/linux/timer.c
+++ b/src/linux/timer.c
@@ -106,7 +106,7 @@ timer_check_periodic(struct timespec *ts)
* Timers
****************************************************************/
-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