diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2016-06-05 14:58:12 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2016-06-13 23:18:58 -0400 |
commit | 9f8817a47e10f35e8008e40576d2bc54157c2767 (patch) | |
tree | 7121f7fa659ff234651d988aed6eead6ca7d67c0 /src | |
parent | 9971f999b382ef51a3a3d1db4a3385b7cc23a3a0 (diff) | |
download | kutter-9f8817a47e10f35e8008e40576d2bc54157c2767.tar.gz kutter-9f8817a47e10f35e8008e40576d2bc54157c2767.tar.xz kutter-9f8817a47e10f35e8008e40576d2bc54157c2767.zip |
generic: Move board timer.h files into generic/misc.h
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/avr/timer.c | 2 | ||||
-rw-r--r-- | src/avr/timer.h | 12 | ||||
-rw-r--r-- | src/generic/misc.h | 6 | ||||
-rw-r--r-- | src/sched.c | 2 | ||||
-rw-r--r-- | src/simulator/timer.h | 12 |
5 files changed, 8 insertions, 26 deletions
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 <avr/interrupt.h> // 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 <stdint.h> - -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 <stddef.h> // 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 <stdint.h> - -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 |