mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-08 12:45:26 -05:00
Sansa AMS: centralize clock settings in clock-target.h
Reorder system_init() to initialize peripherals not only in bootloader Use a 65MHz PCLK (and memclk) which will be needed for realtime decoding git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19330 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
7ea9e31658
commit
45711ac286
9 changed files with 98 additions and 24 deletions
|
|
@ -38,6 +38,7 @@
|
|||
*/
|
||||
|
||||
#include "ascodec-target.h"
|
||||
#include "clock-target.h"
|
||||
#include "kernel.h"
|
||||
#include "as3525.h"
|
||||
|
||||
|
|
@ -68,7 +69,7 @@ void ascodec_init(void)
|
|||
CGU_PERI |= CGU_I2C_AUDIO_MASTER_CLOCK_ENABLE;
|
||||
|
||||
/* prescaler for i2c clock */
|
||||
I2C2_CPSR0 = 60; /* 24 MHz / 400 kHz */
|
||||
I2C2_CPSR0 = CLK_DIV(AS3525_PCLK_FREQ, AS3525_I2C_FREQ);
|
||||
I2C2_CPSR1 = 0; /* MSB */
|
||||
|
||||
/* set i2c slave address of codec part */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue