1
0
Fork 0
forked from len0rd/rockbox

H300 FM radio support, with help from Peter D'Hoye

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8237 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2005-12-15 01:11:19 +00:00
parent c3387e545d
commit a4b15a4f1f
6 changed files with 61 additions and 18 deletions

View file

@ -46,7 +46,14 @@ void i2c_init(void)
or_l(0x00000008, &GPIO_ENABLE);
or_l(0x00800000, &GPIO1_FUNCTION);
or_l(0x00000008, &GPIO_FUNCTION);
#elif defined(IRIVER_H300_SERIES)
/* The FM chip has no pullup for SCL, so we have to bit-bang the
I2C for that one. */
or_l(0x03000000, &GPIO1_OUT);
or_l(0x03000000, &GPIO1_ENABLE);
or_l(0x03000000, &GPIO1_FUNCTION);
#endif
/* I2C Clock divisor = 576 => 119.952 MHz / 2 / 576 = 104.125 kHz */
MFDR = 0x14;