diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2008-12-16 22:58:47 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2008-12-16 22:58:47 +0000 |
commit | c7c546cf59c4833b60080029ee31ae7f42e5a6bf (patch) | |
tree | 4e71e0f996d9aff4cd8afb0a80e024236dc3403e /firmware | |
parent | 1244ab632c1739ca2cd59d52e390e3115bb149bf (diff) | |
download | rockbox-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/SOURCES | 4 | ||||
-rw-r--r-- | firmware/target/arm/as3525/fmradio-i2c-as3525.c | 10 |
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 | |||
1087 | target/arm/as3525/sansa-e200v2/button-e200v2.c | 1087 | target/arm/as3525/sansa-e200v2/button-e200v2.c |
1088 | target/arm/as3525/backlight-e200v2-fuze.c | 1088 | target/arm/as3525/backlight-e200v2-fuze.c |
1089 | #ifndef BOOTLOADER | 1089 | #ifndef BOOTLOADER |
1090 | drivers/generic_i2c.c | ||
1091 | target/arm/as3525/fmradio-i2c-as3525.c | ||
1090 | target/arm/as3525/powermgmt-as3525.c | 1092 | target/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 | |||
1110 | target/arm/as3525/sansa-fuze/lcd-fuze.c | 1112 | target/arm/as3525/sansa-fuze/lcd-fuze.c |
1111 | target/arm/as3525/backlight-e200v2-fuze.c | 1113 | target/arm/as3525/backlight-e200v2-fuze.c |
1112 | #ifndef BOOTLOADER | 1114 | #ifndef BOOTLOADER |
1115 | drivers/generic_i2c.c | ||
1116 | target/arm/as3525/fmradio-i2c-as3525.c | ||
1113 | target/arm/as3525/powermgmt-as3525.c | 1117 | target/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 */ |
111 | static struct i2c_interface fm_i2c_interface = { | 117 | static 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, |