summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2008-12-16 22:58:47 +0000
committerBertrik Sikken <bertrik@sikken.nl>2008-12-16 22:58:47 +0000
commitc7c546cf59c4833b60080029ee31ae7f42e5a6bf (patch)
tree4e71e0f996d9aff4cd8afb0a80e024236dc3403e /firmware
parent1244ab632c1739ca2cd59d52e390e3115bb149bf (diff)
downloadrockbox-c7c546cf59c4833b60080029ee31ae7f42e5a6bf.tar.gz
rockbox-c7c546cf59c4833b60080029ee31ae7f42e5a6bf.zip
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
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES4
-rw-r--r--firmware/target/arm/as3525/fmradio-i2c-as3525.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 6587b59f86..5d1dd0d800 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -1087,6 +1087,8 @@ target/arm/as3525/sansa-e200v2/lcd-e200v2.c
1087target/arm/as3525/sansa-e200v2/button-e200v2.c 1087target/arm/as3525/sansa-e200v2/button-e200v2.c
1088target/arm/as3525/backlight-e200v2-fuze.c 1088target/arm/as3525/backlight-e200v2-fuze.c
1089#ifndef BOOTLOADER 1089#ifndef BOOTLOADER
1090drivers/generic_i2c.c
1091target/arm/as3525/fmradio-i2c-as3525.c
1090target/arm/as3525/powermgmt-as3525.c 1092target/arm/as3525/powermgmt-as3525.c
1091#endif /* !BOOTLOADER */ 1093#endif /* !BOOTLOADER */
1092#endif /* !SIMULATOR */ 1094#endif /* !SIMULATOR */
@@ -1110,6 +1112,8 @@ target/arm/as3525/sansa-fuze/button-fuze.c
1110target/arm/as3525/sansa-fuze/lcd-fuze.c 1112target/arm/as3525/sansa-fuze/lcd-fuze.c
1111target/arm/as3525/backlight-e200v2-fuze.c 1113target/arm/as3525/backlight-e200v2-fuze.c
1112#ifndef BOOTLOADER 1114#ifndef BOOTLOADER
1115drivers/generic_i2c.c
1116target/arm/as3525/fmradio-i2c-as3525.c
1113target/arm/as3525/powermgmt-as3525.c 1117target/arm/as3525/powermgmt-as3525.c
1114#endif /* !BOOTLOADER */ 1118#endif /* !BOOTLOADER */
1115#endif /* !SIMULATOR */ 1119#endif /* !SIMULATOR */
diff --git a/firmware/target/arm/as3525/fmradio-i2c-as3525.c b/firmware/target/arm/as3525/fmradio-i2c-as3525.c
index 18f29dbc57..72775eda75 100644
--- a/firmware/target/arm/as3525/fmradio-i2c-as3525.c
+++ b/firmware/target/arm/as3525/fmradio-i2c-as3525.c
@@ -7,7 +7,7 @@
7 * \/ \/ \/ \/ \/ 7 * \/ \/ \/ \/ \/
8 * $Id$ 8 * $Id$
9 * 9 *
10 * Copyright (C) 2006 by Bertrik Sikken 10 * Copyright (C) 2008 by Bertrik Sikken
11 * 11 *
12 * This program is free software; you can redistribute it and/or 12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License 13 * modify it under the terms of the GNU General Public License
@@ -43,6 +43,12 @@
43#define I2C_SCL_PIN 7 43#define I2C_SCL_PIN 7
44#define I2C_SDA_PIN 6 44#define I2C_SDA_PIN 6
45 45
46#elif defined(SANSA_FUZE) || defined(SANSA_E200V2)
47#define I2C_GPIO(x) GPIOA_PIN(x)
48#define I2C_GPIO_DIR GPIOA_DIR
49#define I2C_SCL_PIN 6
50#define I2C_SDA_PIN 7
51
46#elif 52#elif
47#error no FM I2C GPIOPIN defines 53#error no FM I2C GPIOPIN defines
48#endif 54#endif
@@ -109,7 +115,7 @@ static void fm_delay(void)
109 115
110/* interface towards the generic i2c driver */ 116/* interface towards the generic i2c driver */
111static struct i2c_interface fm_i2c_interface = { 117static struct i2c_interface fm_i2c_interface = {
112#if defined(SANSA_CLIP) 118#if defined(SANSA_CLIP) || defined(SANSA_FUZE) || defined(SANSA_E200V2)
113 .address = 0x10 << 1, 119 .address = 0x10 << 1,
114#elif defined(SANSA_M200V4) 120#elif defined(SANSA_M200V4)
115 .address = 0xC0, 121 .address = 0xC0,