Add const to function header for const config data
authorNathael Pajani <nathael.pajani@ed3l.fr>
Fri, 14 Aug 2015 15:11:00 +0000 (17:11 +0200)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:04 +0000 (17:03 +0100)
drivers/timers.c
include/drivers/timers.h

index 183956d..d3d1c98 100644 (file)
@@ -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;
index 8881398..1f3c6ad 100644 (file)
@@ -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);