From 5d29fe79d30f430ae326d9dc57ccfaed6fe61328 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 8 Mar 2016 16:10:33 +0100 Subject: Another full update of current work --- include/timer.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 include/timer.h (limited to 'include/timer.h') diff --git a/include/timer.h b/include/timer.h new file mode 100644 index 0000000..4fef95c --- /dev/null +++ b/include/timer.h @@ -0,0 +1,28 @@ +#include +#include +#include + +#include "mcu/mcu_def.h" +#include "utils/narray.h" + +#ifndef _IOE_TIMER_H_ +#define _IOE_TIMER_H_ +#ifdef CONFIG_IOE_TIMERS + +enum timerDivider { + TIMER_DIVIDER_1, + TIMER_DIVIDER_8, + TIMER_DIVIDER_64, + TIMER_DIVIDER_256, + TIMER_DIVIDER_1024 +}; + +void timer_init(uint8_t timer, enum timerDivider div); +void timer_disable(uint8_t timer); +void timer_reset(uint8_t timer); +uint16_t timer_value(uint8_t timer); +void timer_sethook(uint8_t timer, void (*fnc) (void)); +void timer_remhook(uint8_t timer, void (*fnc) (void)); + +#endif /* CONFIG_IOE_TIMERS */ +#endif /* _IOE_TIMER_H_ */ -- cgit v1.2.3