diff --git a/src/avr/timer.c b/src/avr/timer.c index 31f94caf..442bff32 100644 --- a/src/avr/timer.c +++ b/src/avr/timer.c @@ -6,10 +6,10 @@ #include // TCNT1 #include "autoconf.h" // CONFIG_AVR_CLKPR +#include "board/misc.h" // timer_from_us #include "command.h" // shutdown #include "irq.h" // irq_save #include "sched.h" // sched_timer_kick -#include "timer.h" // timer_from_us /**************************************************************** diff --git a/src/avr/timer.h b/src/avr/timer.h deleted file mode 100644 index 188d8a98..00000000 --- a/src/avr/timer.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __AVR_TIMER_H -#define __AVR_TIMER_H - -#include - -uint32_t timer_from_us(uint32_t us); -void timer_periodic(void); -uint32_t timer_read_time(void); -uint8_t timer_set_next(uint32_t next); -uint8_t timer_try_set_next(uint32_t next); - -#endif // timer.h diff --git a/src/generic/misc.h b/src/generic/misc.h index 9b2986be..ce1c8f02 100644 --- a/src/generic/misc.h +++ b/src/generic/misc.h @@ -9,6 +9,12 @@ void console_pop_input(uint8_t len); char *console_get_output(uint8_t len); void console_push_output(uint8_t len); +uint32_t timer_from_us(uint32_t us); +void timer_periodic(void); +uint32_t timer_read_time(void); +uint8_t timer_set_next(uint32_t next); +uint8_t timer_try_set_next(uint32_t next); + size_t alloc_maxsize(size_t reqsize); uint16_t crc16_ccitt(char *buf, uint8_t len); diff --git a/src/sched.c b/src/sched.c index 2ac1a929..539cb57b 100644 --- a/src/sched.c +++ b/src/sched.c @@ -9,7 +9,7 @@ #include // NULL #include "autoconf.h" // CONFIG_* #include "board/irq.h" // irq_save -#include "board/timer.h" // timer_from_us +#include "board/misc.h" // timer_from_us #include "command.h" // shutdown #include "sched.h" // sched_from_us #include "stepper.h" // stepper_event diff --git a/src/simulator/timer.h b/src/simulator/timer.h deleted file mode 100644 index 71b64502..00000000 --- a/src/simulator/timer.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __SIMU_TIMER_H -#define __SIMU_TIMER_H - -#include - -uint32_t timer_from_us(uint32_t us); -void timer_periodic(void); -uint32_t timer_read_time(void); -uint8_t timer_set_next(uint32_t next); -uint8_t timer_try_set_next(uint32_t next); - -#endif // timer.h