forked from len0rd/rockbox
Sansav2 Bootloader
Adds read-only SD driver, largely copied from ata-sd-pp.c Only tested on the embedded SD, on the Clip First steps to build a Normal firmware git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19045 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
308f21dc68
commit
aef27e1f0c
9 changed files with 661 additions and 179 deletions
|
|
@ -32,12 +32,9 @@ void INT_TIMER2(void)
|
|||
|
||||
void tick_start(unsigned int interval_in_ms)
|
||||
{
|
||||
#ifdef BOOTLOADER
|
||||
(void) interval_in_ms;
|
||||
#else
|
||||
int phi = 0; /* prescaler bits */
|
||||
int prescale = 1;
|
||||
int cycles = 64000 * interval_in_ms; /* pclk is clocked at 64MHz */
|
||||
int cycles = 1000 * interval_in_ms; /* pclk is clocked at 64MHz */
|
||||
|
||||
while(cycles > 0x10000)
|
||||
{
|
||||
|
|
@ -57,5 +54,4 @@ void tick_start(unsigned int interval_in_ms)
|
|||
/* /!\ bit 4 (reserved) must not be modified
|
||||
* periodic mode, interrupt enabled, 16 bits counter */
|
||||
TIMER2_CONTROL = (TIMER2_CONTROL & (1<<4)) | 0xe0 | (phi<<2);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue