mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
iPod Classic: minor modifications in TIMER
The current behaviour should not change. Change-Id: Ia8f44cdccf41dbc3881722f9aebab91de51a9bc5
This commit is contained in:
parent
8618f2c227
commit
bfb63f8017
3 changed files with 24 additions and 23 deletions
|
|
@ -39,19 +39,16 @@ void tick_start(unsigned int interval_in_ms)
|
|||
{
|
||||
int cycles = 10 * interval_in_ms;
|
||||
|
||||
/* configure timer for 10 kHz (external source) */
|
||||
/* configure timer for 10 kHz (12 MHz / 16 / 75) */
|
||||
TBCMD = (1 << 1); /* TB_CLR */
|
||||
TBPRE = 75 - 1; /* prescaler */ /* 12 MHz / 16 / 75 = 10 KHz */
|
||||
TBPRE = 75 - 1; /* prescaler */
|
||||
TBCON = (0 << 13) | /* TB_INT1_EN */
|
||||
(1 << 12) | /* TB_INT0_EN */
|
||||
(0 << 11) | /* TB_START */
|
||||
(2 << 8) | /* TB_CS = PCLK / 16 */
|
||||
(1 << 6) | /* UNKNOWN bit */ /* external 12 MHz clock (?) */
|
||||
(2 << 8) | /* TB_CS = ECLK / 16 */
|
||||
(1 << 6) | /* select ECLK (12 MHz) */
|
||||
(0 << 4); /* TB_MODE_SEL = interval mode */
|
||||
TBDATA0 = cycles; /* set interval period */
|
||||
TBCMD = (1 << 0); /* TB_EN */
|
||||
|
||||
/* enable timer interrupt */
|
||||
VIC0INTENABLE = 1 << IRQ_TIMER;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue