mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 20:55:17 -05:00
New port: iPod Classic (also known as iPod 6G/6.5G/7G)
Major known issues: - No bootloader yet - No support for the first-generation 160GB CE-ATA hard disk drive yet - Audio playback is slow, only FLAC seems to reach realtime git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28953 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6f40387e74
commit
152847977a
43 changed files with 4975 additions and 37 deletions
56
firmware/target/arm/s5l8702/kernel-s5l8702.c
Normal file
56
firmware/target/arm/s5l8702/kernel-s5l8702.c
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id: kernel-s5l8700.c 28795 2010-12-11 17:52:52Z Buschel $
|
||||
*
|
||||
* Copyright © 2009 Bertrik Sikken
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "kernel.h"
|
||||
|
||||
/* S5L8702 driver for the kernel timer
|
||||
|
||||
Timer B is configured as a 10 kHz timer
|
||||
*/
|
||||
|
||||
void INT_TIMERB(void)
|
||||
{
|
||||
/* clear interrupt */
|
||||
TBCON = TBCON;
|
||||
|
||||
call_tick_tasks(); /* Run through the list of tick tasks */
|
||||
}
|
||||
|
||||
void tick_start(unsigned int interval_in_ms)
|
||||
{
|
||||
int cycles = 10 * interval_in_ms;
|
||||
|
||||
/* configure timer for 10 kHz */
|
||||
TBCMD = (1 << 1); /* TB_CLR */
|
||||
TBPRE = 208 - 1; /* prescaler */
|
||||
TBCON = (0 << 13) | /* TB_INT1_EN */
|
||||
(1 << 12) | /* TB_INT0_EN */
|
||||
(0 << 11) | /* TB_START */
|
||||
(2 << 8) | /* TB_CS = PCLK / 16 */
|
||||
(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