AMS Sansa: add fmradio i2c support for e200v2 and the fuze, by Thomas Martitz and Michael Chicoine

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19463 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2008-12-16 22:58:47 +00:00
parent 1244ab632c
commit c7c546cf59
2 changed files with 12 additions and 2 deletions

View file

@ -1087,6 +1087,8 @@ target/arm/as3525/sansa-e200v2/lcd-e200v2.c
target/arm/as3525/sansa-e200v2/button-e200v2.c
target/arm/as3525/backlight-e200v2-fuze.c
#ifndef BOOTLOADER
drivers/generic_i2c.c
target/arm/as3525/fmradio-i2c-as3525.c
target/arm/as3525/powermgmt-as3525.c
#endif /* !BOOTLOADER */
#endif /* !SIMULATOR */
@ -1110,6 +1112,8 @@ target/arm/as3525/sansa-fuze/button-fuze.c
target/arm/as3525/sansa-fuze/lcd-fuze.c
target/arm/as3525/backlight-e200v2-fuze.c
#ifndef BOOTLOADER
drivers/generic_i2c.c
target/arm/as3525/fmradio-i2c-as3525.c
target/arm/as3525/powermgmt-as3525.c
#endif /* !BOOTLOADER */
#endif /* !SIMULATOR */

View file

@ -7,7 +7,7 @@
* \/ \/ \/ \/ \/
* $Id$
*
* Copyright (C) 2006 by Bertrik Sikken
* Copyright (C) 2008 by Bertrik Sikken
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@ -43,6 +43,12 @@
#define I2C_SCL_PIN 7
#define I2C_SDA_PIN 6
#elif defined(SANSA_FUZE) || defined(SANSA_E200V2)
#define I2C_GPIO(x) GPIOA_PIN(x)
#define I2C_GPIO_DIR GPIOA_DIR
#define I2C_SCL_PIN 6
#define I2C_SDA_PIN 7
#elif
#error no FM I2C GPIOPIN defines
#endif
@ -109,7 +115,7 @@ static void fm_delay(void)
/* interface towards the generic i2c driver */
static struct i2c_interface fm_i2c_interface = {
#if defined(SANSA_CLIP)
#if defined(SANSA_CLIP) || defined(SANSA_FUZE) || defined(SANSA_E200V2)
.address = 0x10 << 1,
#elif defined(SANSA_M200V4)
.address = 0xC0,