From: Nathael Pajani Date: Fri, 14 Aug 2015 15:11:00 +0000 (+0200) Subject: Add const to function header for const config data X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=c34bfe5e1c35b06d8f3b9c5505229705232fe238;p=soft%2Flpc122x%2Fcore Add const to function header for const config data --- 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);