diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2017-05-26 08:34:31 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-05-26 12:32:05 -0400 |
commit | ca9756413f2793279b5ba1c1ecf274ce734b2087 (patch) | |
tree | 292f855ec549f6b7355589af4c4a95c86444b4c5 /src/sched.h | |
parent | b9940f0e0d7b5b4fae497cc80d14948a091d71c2 (diff) | |
download | kutter-ca9756413f2793279b5ba1c1ecf274ce734b2087.tar.gz kutter-ca9756413f2793279b5ba1c1ecf274ce734b2087.tar.xz kutter-ca9756413f2793279b5ba1c1ecf274ce734b2087.zip |
sched: Allow shutdown_reason to be uint8
Store the shutdown_reason code in an 8-bit integer - this produces
better code on AVR.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/sched.h')
-rw-r--r-- | src/sched.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/sched.h b/src/sched.h index d2d3471e..9d6411d0 100644 --- a/src/sched.h +++ b/src/sched.h @@ -1,8 +1,7 @@ #ifndef __SCHED_H #define __SCHED_H -#include <stdint.h> -#include "board/pgm.h" // PSTR +#include <stdint.h> // uint32_t #include "compiler.h" // __section // Declare an init function (called at firmware startup) @@ -27,10 +26,10 @@ void sched_add_timer(struct timer*); void sched_del_timer(struct timer *del); unsigned int sched_timer_dispatch(void); uint8_t sched_is_shutdown(void); -uint16_t sched_shutdown_reason(void); void sched_clear_shutdown(void); -void sched_try_shutdown(unsigned int reason); -void sched_shutdown(unsigned int reason) __noreturn; +void sched_try_shutdown(uint_fast8_t reason); +void sched_shutdown(uint_fast8_t reason) __noreturn; +void sched_report_shutdown(void); void sched_main(void); // Compiler glue for DECL_X macros above. |