diff options
author | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-02 04:15:27 +0100 |
---|---|---|
committer | Amaury Pouly <amaury.pouly@gmail.com> | 2014-02-10 23:14:23 +0100 |
commit | 4495913c289d34271197dce0dc5f6c45f5ea62e6 (patch) | |
tree | bab4b2e477bcc1fdb5876cbf1ab36165de6aee46 /firmware/target/arm/imx233/timrot-imx233.h | |
parent | c1609b08892ec6878c6cc1ea20689145d23a51e6 (diff) | |
download | rockbox-4495913c289d34271197dce0dc5f6c45f5ea62e6.tar.gz rockbox-4495913c289d34271197dce0dc5f6c45f5ea62e6.tar.bz2 rockbox-4495913c289d34271197dce0dc5f6c45f5ea62e6.zip |
imx233: clean timrot a bit
Change-Id: Ic803a6b5c93978cd3246e553579ac8a1ba35e191
Diffstat (limited to 'firmware/target/arm/imx233/timrot-imx233.h')
-rw-r--r-- | firmware/target/arm/imx233/timrot-imx233.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/timrot-imx233.h b/firmware/target/arm/imx233/timrot-imx233.h index f7a7bc3f8d..e033673a83 100644 --- a/firmware/target/arm/imx233/timrot-imx233.h +++ b/firmware/target/arm/imx233/timrot-imx233.h @@ -26,10 +26,28 @@ #include "regs/regs-timrot.h" +/* list of timers */ +enum +{ + TIMER_TICK, /* for tick task */ + TIMER_USER, /* for user timer */ +}; + +struct imx233_timrot_info_t +{ + unsigned fixed_count, run_count; + unsigned src; + unsigned prescale; + bool reload; + bool polarity; + bool irqen; +}; + typedef void (*imx233_timer_fn_t)(void); void imx233_timrot_init(void); -void imx233_setup_timer(unsigned timer_nr, bool reload, unsigned count, +void imx233_timrot_setup(unsigned timer_nr, bool reload, unsigned count, unsigned src, unsigned prescale, bool polarity, imx233_timer_fn_t fn); +struct imx233_timrot_info_t imx233_timrot_get_info(unsigned timer_nr); #endif /* TIMROT_IMX233_H */ |