mirror of
https://github.com/Klipper3d/klipper.git
synced 2025-07-12 17:27:54 -06:00
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:
parent
fa85094cbb
commit
b0524947e5
7 changed files with 14 additions and 14 deletions
|
@ -25,7 +25,7 @@ static uint16_t millis;
|
|||
// also simplifies the timer code by ensuring there is always at least
|
||||
// one timer on the timer list and that there is always a timer not
|
||||
// more than 1 ms in the future.
|
||||
static uint8_t
|
||||
static uint_fast8_t
|
||||
ms_event(struct timer *t)
|
||||
{
|
||||
millis++;
|
||||
|
@ -154,7 +154,7 @@ sched_timer_kick(void)
|
|||
struct timer *t = timer_list;
|
||||
for (;;) {
|
||||
// Invoke timer callback
|
||||
uint8_t res;
|
||||
uint_fast8_t res;
|
||||
if (CONFIG_INLINE_STEPPER_HACK && likely(!t->func))
|
||||
res = stepper_event(t);
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue