diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-06-08 21:33:50 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-06-14 14:00:53 -0400 |
commit | b0524947e5a86bdbdd58dab42de3363a627e6910 (patch) | |
tree | 1187da49413ab45f0133372ce2778e19a34097c4 /src/gpiocmds.c | |
parent | fa85094cbb139c734150802b02e22913abcfccb3 (diff) | |
download | kutter-b0524947e5a86bdbdd58dab42de3363a627e6910.tar.gz kutter-b0524947e5a86bdbdd58dab42de3363a627e6910.tar.xz kutter-b0524947e5a86bdbdd58dab42de3363a627e6910.zip |
sched: Use uint_fast8_t for return type of timers
Some architectures are faster passing regular integers than 8bit
integers. Use uint_fast8_t so that the architecture chooses the
appropriate type.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/gpiocmds.c')
-rw-r--r-- | src/gpiocmds.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpiocmds.c b/src/gpiocmds.c index 864d6526..a86e12c9 100644 --- a/src/gpiocmds.c +++ b/src/gpiocmds.c @@ -22,13 +22,13 @@ struct digital_out_s { uint8_t value, default_value; }; -static uint8_t +static uint_fast8_t digital_end_event(struct timer *timer) { shutdown("Missed scheduling of next pin event"); } -static uint8_t +static uint_fast8_t digital_out_event(struct timer *timer) { struct digital_out_s *d = container_of(timer, struct digital_out_s, timer); @@ -103,10 +103,10 @@ enum { SPF_NEXT_ON=1<<4, SPF_NEXT_TOGGLING=1<<5, SPF_NEXT_CHECK_END=1<<6, }; -static uint8_t soft_pwm_load_event(struct timer *timer); +static uint_fast8_t soft_pwm_load_event(struct timer *timer); // Normal pulse change event -static uint8_t +static uint_fast8_t soft_pwm_toggle_event(struct timer *timer) { struct soft_pwm_s *s = container_of(timer, struct soft_pwm_s, timer); @@ -127,7 +127,7 @@ soft_pwm_toggle_event(struct timer *timer) } // Load next pwm settings -static uint8_t +static uint_fast8_t soft_pwm_load_event(struct timer *timer) { struct soft_pwm_s *s = container_of(timer, struct soft_pwm_s, timer); |