From c34bfe5e1c35b06d8f3b9c5505229705232fe238 Mon Sep 17 00:00:00 2001 From: Nathael Pajani Date: Fri, 14 Aug 2015 17:11:00 +0200 Subject: [PATCH] Add const to function header for const config data --- drivers/timers.c | 2 +- include/drivers/timers.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/timers.c b/drivers/timers.c index 183956d..d3d1c98 100644 --- a/drivers/timers.c +++ b/drivers/timers.c @@ -154,7 +154,7 @@ void timer_set_match(uint32_t timer_num, uint32_t channel, uint32_t val) * Takes a timer number and a timer config structure as arguments. * Refer to timer config structure for details. */ -int timer_setup(uint32_t timer_num, struct timer_config* conf) +int timer_setup(uint32_t timer_num, const struct timer_config* conf) { struct timer_device* timer = NULL; int i = 0; diff --git a/include/drivers/timers.h b/include/drivers/timers.h index 8881398..1f3c6ad 100644 --- a/include/drivers/timers.h +++ b/include/drivers/timers.h @@ -98,7 +98,7 @@ void timer_set_match(uint32_t timer_num, uint32_t channel, uint32_t val); * Refer to timer config structure for details. * Note: use of channel 3 for PWM cycle length is enforced. */ -int timer_setup(uint32_t timer_num, struct timer_config* conf); +int timer_setup(uint32_t timer_num, const struct timer_config* conf); -- 2.43.0