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>
This commit is contained in:
Kevin O'Connor
2016-06-08 21:33:50 -04:00
parent fa85094cbb
commit b0524947e5
7 changed files with 14 additions and 14 deletions

View File

@@ -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);