Ensure consistency between header file and implementation for iPod drivers, by #including the appropriate header file and #ifdef'fing out unused code

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18066 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Bertrik Sikken 2008-07-16 11:02:14 +00:00
parent eb66b559e1
commit a12894c6dc
15 changed files with 25 additions and 6 deletions

View file

@ -34,6 +34,7 @@
#include "wmcodec.h" #include "wmcodec.h"
#include "audiohw.h" #include "audiohw.h"
#include "i2s.h" #include "i2s.h"
#include "sound.h"
const struct sound_settings_info audiohw_settings[] = { const struct sound_settings_info audiohw_settings[] = {
[SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25}, [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25},
@ -236,6 +237,7 @@ void audiohw_set_sample_rate(int sampling_control)
codec_set_active(true); codec_set_active(true);
} }
#ifdef HAVE_RECORDING
void audiohw_enable_recording(bool source_mic) void audiohw_enable_recording(bool source_mic)
{ {
codec_set_active(false); codec_set_active(false);
@ -331,3 +333,5 @@ void audiohw_set_monitor(bool enable)
wm8731_write_or(PDCTRL, PDCTRL_LINEINPD); wm8731_write_or(PDCTRL, PDCTRL_LINEINPD);
} }
} }
#endif /* HAVE_RECORDING */

View file

@ -32,6 +32,7 @@
#endif #endif
#include "rtc.h" #include "rtc.h"
#include "pcf5060x.h" #include "pcf5060x.h"
#include "pcf50605.h"
unsigned char pcf50605_wakeup_flags = 0; unsigned char pcf50605_wakeup_flags = 0;

View file

@ -23,11 +23,10 @@
#include "audio.h" #include "audio.h"
#include "sound.h" #include "sound.h"
#if INPUT_SRC_CAPS != 0
void audio_set_output_source(int source) void audio_set_output_source(int source)
{ {
#if INPUT_SRC_CAPS != 0
if ((unsigned)source >= AUDIO_NUM_SOURCES) if ((unsigned)source >= AUDIO_NUM_SOURCES)
#endif
source = AUDIO_SRC_PLAYBACK; source = AUDIO_SRC_PLAYBACK;
} /* audio_set_output_source */ } /* audio_set_output_source */
@ -109,5 +108,5 @@ void audio_input_mux(int source, unsigned flags)
last_source = source; last_source = source;
} /* audio_input_mux */ } /* audio_input_mux */
#endif /* INPUT_SRC_CAPS != 0 */

View file

@ -23,6 +23,8 @@
#include "cpu.h" #include "cpu.h"
#include "hwcompat.h" #include "hwcompat.h"
#include "kernel.h" #include "kernel.h"
#include "adc.h"
#include "adc-target.h"
static struct mutex adc_mtx SHAREDBSS_ATTR; static struct mutex adc_mtx SHAREDBSS_ATTR;

View file

@ -29,6 +29,7 @@
/* Force a scan now */ /* Force a scan now */
unsigned short adc_scan(int channel); unsigned short adc_scan(int channel);
void ipod_2g_adc_int(void);
static inline unsigned short adc_read(int channel) static inline unsigned short adc_read(int channel)
{ {
return adc_scan(channel); return adc_scan(channel);

View file

@ -20,8 +20,9 @@
****************************************************************************/ ****************************************************************************/
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "backlight.h"
#include "lcd.h" #include "lcd.h"
#include "backlight.h"
#include "backlight-target.h"
void _backlight_on(void) void _backlight_on(void)
{ {

View file

@ -21,6 +21,7 @@
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "backlight.h" #include "backlight.h"
#include "backlight-target.h"
void _backlight_on(void) void _backlight_on(void)
{ {

View file

@ -32,6 +32,7 @@
#include "button.h" #include "button.h"
#include "timer.h" #include "timer.h"
#include "backlight.h" #include "backlight.h"
#include "backlight-target.h"
void _backlight_on(void) void _backlight_on(void)
{ {

View file

@ -32,6 +32,7 @@
#include "button.h" #include "button.h"
#include "timer.h" #include "timer.h"
#include "backlight.h" #include "backlight.h"
#include "backlight-target.h"
void _backlight_hw_on(void) void _backlight_hw_on(void)
{ {

View file

@ -32,6 +32,7 @@
#include "button.h" #include "button.h"
#include "timer.h" #include "timer.h"
#include "backlight.h" #include "backlight.h"
#include "backlight-target.h"
static int brightness = 1; /* 1 to 32 */ static int brightness = 1; /* 1 to 32 */
static int current_dim = 16; /* default after enabling the backlight dimmer */ static int current_dim = 16; /* default after enabling the backlight dimmer */

View file

@ -31,6 +31,7 @@ void button_init_device(void);
int button_read_device(void); int button_read_device(void);
void ipod_mini_button_int(void); void ipod_mini_button_int(void);
void ipod_3g_button_int(void);
void ipod_4g_button_int(void); void ipod_4g_button_int(void);
/* iPod specific button codes */ /* iPod specific button codes */

View file

@ -239,6 +239,7 @@ void lcd_set_flip(bool yesno)
#endif #endif
} }
#ifdef HAVE_LCD_ENABLE
void lcd_enable(bool on) void lcd_enable(bool on)
{ {
if (on) if (on)
@ -257,6 +258,7 @@ void lcd_enable(bool on)
/* enter standby mode */ /* enter standby mode */
} }
} }
#endif /* HAVE_LCD_ENABLE */
/*** update functions ***/ /*** update functions ***/

View file

@ -42,6 +42,7 @@ void power_init(void)
#endif #endif
} }
#if CONFIG_CHARGING
bool charger_inserted(void) bool charger_inserted(void)
{ {
#if defined(IPOD_VIDEO) #if defined(IPOD_VIDEO)
@ -60,6 +61,7 @@ bool charger_inserted(void)
bool charging_state(void) { bool charging_state(void) {
return (GPIOB_INPUT_VAL & 0x01)?false:true; return (GPIOB_INPUT_VAL & 0x01)?false:true;
} }
#endif /* CONFIG_CHARGING */
void ide_power_enable(bool on) void ide_power_enable(bool on)

View file

@ -21,10 +21,11 @@
#include "system.h" #include "system.h"
#ifndef BOOTLOADER #ifndef BOOTLOADER
#include "adc-target.h"
#include "button-target.h"
extern void TIMER1(void); extern void TIMER1(void);
extern void TIMER2(void); extern void TIMER2(void);
extern void ipod_3g_button_int(void);
extern void ipod_2g_adc_int(void);
void irq(void) void irq(void)
{ {

View file

@ -29,6 +29,7 @@
#include "system.h" #include "system.h"
#include "audiohw.h" #include "audiohw.h"
#include "i2c-pp.h" #include "i2c-pp.h"
#include "wmcodec.h"
#if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || defined(MROBE_100) #if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || defined(MROBE_100)
/* The H10's audio codec uses an I2C address of 0x1b */ /* The H10's audio codec uses an I2C address of 0x1b */