mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
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:
parent
eb66b559e1
commit
a12894c6dc
15 changed files with 25 additions and 6 deletions
|
@ -34,6 +34,7 @@
|
|||
#include "wmcodec.h"
|
||||
#include "audiohw.h"
|
||||
#include "i2s.h"
|
||||
#include "sound.h"
|
||||
|
||||
const struct sound_settings_info audiohw_settings[] = {
|
||||
[SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25},
|
||||
|
@ -236,6 +237,7 @@ void audiohw_set_sample_rate(int sampling_control)
|
|||
codec_set_active(true);
|
||||
}
|
||||
|
||||
#ifdef HAVE_RECORDING
|
||||
void audiohw_enable_recording(bool source_mic)
|
||||
{
|
||||
codec_set_active(false);
|
||||
|
@ -331,3 +333,5 @@ void audiohw_set_monitor(bool enable)
|
|||
wm8731_write_or(PDCTRL, PDCTRL_LINEINPD);
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_RECORDING */
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#endif
|
||||
#include "rtc.h"
|
||||
#include "pcf5060x.h"
|
||||
#include "pcf50605.h"
|
||||
|
||||
unsigned char pcf50605_wakeup_flags = 0;
|
||||
|
||||
|
|
|
@ -23,11 +23,10 @@
|
|||
#include "audio.h"
|
||||
#include "sound.h"
|
||||
|
||||
#if INPUT_SRC_CAPS != 0
|
||||
void audio_set_output_source(int source)
|
||||
{
|
||||
#if INPUT_SRC_CAPS != 0
|
||||
if ((unsigned)source >= AUDIO_NUM_SOURCES)
|
||||
#endif
|
||||
source = AUDIO_SRC_PLAYBACK;
|
||||
} /* audio_set_output_source */
|
||||
|
||||
|
@ -109,5 +108,5 @@ void audio_input_mux(int source, unsigned flags)
|
|||
|
||||
last_source = source;
|
||||
} /* audio_input_mux */
|
||||
|
||||
#endif /* INPUT_SRC_CAPS != 0 */
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include "cpu.h"
|
||||
#include "hwcompat.h"
|
||||
#include "kernel.h"
|
||||
#include "adc.h"
|
||||
#include "adc-target.h"
|
||||
|
||||
static struct mutex adc_mtx SHAREDBSS_ATTR;
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
|
||||
/* Force a scan now */
|
||||
unsigned short adc_scan(int channel);
|
||||
void ipod_2g_adc_int(void);
|
||||
static inline unsigned short adc_read(int channel)
|
||||
{
|
||||
return adc_scan(channel);
|
||||
|
|
|
@ -20,8 +20,9 @@
|
|||
****************************************************************************/
|
||||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "backlight.h"
|
||||
#include "lcd.h"
|
||||
#include "backlight.h"
|
||||
#include "backlight-target.h"
|
||||
|
||||
void _backlight_on(void)
|
||||
{
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#include "config.h"
|
||||
#include "system.h"
|
||||
#include "backlight.h"
|
||||
#include "backlight-target.h"
|
||||
|
||||
void _backlight_on(void)
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "button.h"
|
||||
#include "timer.h"
|
||||
#include "backlight.h"
|
||||
#include "backlight-target.h"
|
||||
|
||||
void _backlight_on(void)
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "button.h"
|
||||
#include "timer.h"
|
||||
#include "backlight.h"
|
||||
#include "backlight-target.h"
|
||||
|
||||
void _backlight_hw_on(void)
|
||||
{
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "button.h"
|
||||
#include "timer.h"
|
||||
#include "backlight.h"
|
||||
#include "backlight-target.h"
|
||||
|
||||
static int brightness = 1; /* 1 to 32 */
|
||||
static int current_dim = 16; /* default after enabling the backlight dimmer */
|
||||
|
|
|
@ -31,6 +31,7 @@ void button_init_device(void);
|
|||
int button_read_device(void);
|
||||
|
||||
void ipod_mini_button_int(void);
|
||||
void ipod_3g_button_int(void);
|
||||
void ipod_4g_button_int(void);
|
||||
|
||||
/* iPod specific button codes */
|
||||
|
|
|
@ -239,6 +239,7 @@ void lcd_set_flip(bool yesno)
|
|||
#endif
|
||||
}
|
||||
|
||||
#ifdef HAVE_LCD_ENABLE
|
||||
void lcd_enable(bool on)
|
||||
{
|
||||
if (on)
|
||||
|
@ -257,6 +258,7 @@ void lcd_enable(bool on)
|
|||
/* enter standby mode */
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_LCD_ENABLE */
|
||||
|
||||
/*** update functions ***/
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ void power_init(void)
|
|||
#endif
|
||||
}
|
||||
|
||||
#if CONFIG_CHARGING
|
||||
bool charger_inserted(void)
|
||||
{
|
||||
#if defined(IPOD_VIDEO)
|
||||
|
@ -60,6 +61,7 @@ bool charger_inserted(void)
|
|||
bool charging_state(void) {
|
||||
return (GPIOB_INPUT_VAL & 0x01)?false:true;
|
||||
}
|
||||
#endif /* CONFIG_CHARGING */
|
||||
|
||||
|
||||
void ide_power_enable(bool on)
|
||||
|
|
|
@ -21,10 +21,11 @@
|
|||
#include "system.h"
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
#include "adc-target.h"
|
||||
#include "button-target.h"
|
||||
|
||||
extern void TIMER1(void);
|
||||
extern void TIMER2(void);
|
||||
extern void ipod_3g_button_int(void);
|
||||
extern void ipod_2g_adc_int(void);
|
||||
|
||||
void irq(void)
|
||||
{
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
#include "system.h"
|
||||
#include "audiohw.h"
|
||||
#include "i2c-pp.h"
|
||||
#include "wmcodec.h"
|
||||
|
||||
#if defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || defined(MROBE_100)
|
||||
/* The H10's audio codec uses an I2C address of 0x1b */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue