FS#10245 by Jack Halpin : Adjust Clocking scheme on Sansa AMS

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21088 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2009-05-26 18:44:02 +00:00
parent 29bbcebee4
commit ef9aacb2e0
9 changed files with 158 additions and 76 deletions

View file

@ -78,7 +78,7 @@ void ascodec_init(void)
CGU_PERI |= CGU_I2C_AUDIO_MASTER_CLOCK_ENABLE;
/* prescaler for i2c clock */
prescaler = CLK_DIV(AS3525_PCLK_FREQ, AS3525_I2C_FREQ);
prescaler = AS3525_I2C_PRESCALER;
I2C2_CPSR0 = prescaler & 0xFF; /* 8 lsb */
I2C2_CPSR1 = (prescaler >> 8) & 0x3; /* 2 msb */