mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
imx233/fuze+: implement user time api, implement a stub function, protect timrot against irq
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30437 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
333b9ed2c3
commit
2ac668e44c
7 changed files with 86 additions and 1 deletions
|
|
@ -39,6 +39,8 @@ define_timer_irq(3)
|
|||
void imx233_setup_timer(unsigned timer_nr, bool reload, unsigned count,
|
||||
unsigned src, unsigned prescale, bool polarity, imx233_timer_fn_t fn)
|
||||
{
|
||||
int oldstatus = disable_interrupt_save(IRQ_FIQ_STATUS);
|
||||
|
||||
timer_fns[timer_nr] = fn;
|
||||
|
||||
HW_TIMROT_TIMCTRL(timer_nr) = src | prescale;
|
||||
|
|
@ -65,6 +67,8 @@ void imx233_setup_timer(unsigned timer_nr, bool reload, unsigned count,
|
|||
imx233_enable_interrupt(INT_SRC_TIMER(timer_nr), false);
|
||||
/* finally update */
|
||||
__REG_SET(HW_TIMROT_TIMCTRL(timer_nr)) = HW_TIMROT_TIMCTRL__UPDATE;
|
||||
|
||||
restore_interrupt(oldstatus);
|
||||
}
|
||||
|
||||
void imx233_timrot_init(void)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue