Target tree support for Iriver iFP.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11485 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Tomasz Malesinski 2006-11-09 22:58:35 +00:00
parent fedfd44825
commit 6e992abf36
9 changed files with 21 additions and 125 deletions

View file

@ -518,3 +518,13 @@ target/arm/ipod/power-ipod.c
target/arm/ipod/usb-ipod.c
#endif /* SIMULATOR */
#endif /* IPOD_MINI2G */
#ifdef IRIVER_IFP7XX
target/arm/iriver/ifp7xx/power-ifp7xx.c
#ifndef SIMULATOR
target/arm/iriver/ifp7xx/adc-ifp7xx.c
target/arm/iriver/ifp7xx/backlight-ifp7xx.c
target/arm/iriver/ifp7xx/button-ifp7xx.c
target/arm/iriver/ifp7xx/usb-ifp7xx.c
#endif
#endif

View file

@ -71,8 +71,6 @@ static inline void __backlight_on(void)
or_b(0x40, &PADRH); /* drive it high */
#elif CONFIG_BACKLIGHT == BL_GMINI
P1 |= 0x10;
#elif CONFIG_BACKLIGHT==BL_IRIVER_IFP7XX
GPIO3_SET = 1;
#endif
}
@ -87,8 +85,6 @@ static inline void __backlight_off(void)
and_b(~0x40, &PADRH); /* drive it low */
#elif CONFIG_BACKLIGHT == BL_GMINI
P1 &= ~0x10;
#elif CONFIG_BACKLIGHT==BL_IRIVER_IFP7XX
GPIO3_CLR = 1;
#endif
}
#endif

View file

@ -155,38 +155,4 @@ void adc_init(void)
sleep(2); /* Ensure valid readings when adc_init returns */
}
#elif CONFIG_CPU == PNX0101
static unsigned short adcdata[NUM_ADC_CHANNELS];
unsigned short adc_read(int channel)
{
return adcdata[channel];
}
static void adc_tick(void)
{
if (ADCST & 0x10) {
adcdata[0] = ADCCH0 & 0x3ff;
adcdata[1] = ADCCH1 & 0x3ff;
adcdata[2] = ADCCH2 & 0x3ff;
adcdata[3] = ADCCH3 & 0x3ff;
adcdata[4] = ADCCH4 & 0x3ff;
ADCST = 0xa;
}
}
void adc_init(void)
{
ADCR24 = 0xaaaaa;
ADCR28 = 0;
ADCST = 2;
ADCST = 0xa;
while (!(ADCST & 0x10));
adc_tick();
tick_add_task(adc_tick);
}
#endif

View file

@ -75,10 +75,7 @@ static bool remote_filter_first_keypress;
#define REPEAT_INTERVAL_FINISH 5
/* the power-off button and number of repeated keys before shutting off */
#if (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD)
#define POWEROFF_BUTTON BUTTON_PLAY
#define POWEROFF_COUNT 40
#elif !defined(TARGET_TREE)
#if !defined(TARGET_TREE)
#define POWEROFF_BUTTON BUTTON_OFF
#define POWEROFF_COUNT 10
#endif
@ -506,46 +503,6 @@ static int button_read(void)
|| (CONFIG_KEYPAD == IRIVER_H300_PAD)
btn = button_read_device(); /* temp untill TARGET_TREE is defined */
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
static bool hold_button = false;
bool hold_button_old;
/* normal buttons */
hold_button_old = hold_button;
hold_button = button_hold();
if (hold_button != hold_button_old)
backlight_hold_changed(hold_button);
if (!button_hold())
{
data = adc_read(ADC_BUTTONS);
if (data < 0x35c)
{
if (data < 0x151)
if (data < 0xc7)
if (data < 0x41)
btn = BUTTON_LEFT;
else
btn = BUTTON_RIGHT;
else
btn = BUTTON_SELECT;
else
if (data < 0x268)
if (data < 0x1d7)
btn = BUTTON_UP;
else
btn = BUTTON_DOWN;
else
if (data < 0x2f9)
btn = BUTTON_EQ;
else
btn = BUTTON_MODE;
}
if (adc_read(ADC_BUTTON_PLAY) < 0x64)
btn |= BUTTON_PLAY;
}
#elif CONFIG_KEYPAD == RECORDER_PAD
#ifndef HAVE_FMADC
@ -703,12 +660,6 @@ static int button_read(void)
return retval;
}
#if CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
bool button_hold(void)
{
return (GPIO5_READ & 4) ? false : true;
}
#endif
int button_status(void)
{

View file

@ -144,8 +144,6 @@ void ide_power_enable(bool on)
P1 |= 0x08;
else
P1 &= ~0x08;
#elif CONFIG_CPU == PNX0101
/* no ide controller */
#elif defined(TOSHIBA_GIGABEAT_F)
/* Gigabeat TODO */
#else /* SH1 based archos */
@ -222,10 +220,7 @@ bool ide_powered(void)
void power_off(void)
{
set_irq_level(HIGHEST_IRQ_LEVEL);
#if CONFIG_CPU == PNX0101
GPIO1_CLR = 1 << 16;
GPIO2_SET = 1;
#elif defined(GMINI_ARCH)
#if defined(GMINI_ARCH)
P1 &= ~1;
P1CON &= ~1;
#elif defined(TOSHIBA_GIGABEAT_F)

View file

@ -24,15 +24,6 @@
#ifdef TARGET_TREE
#include "adc-target.h"
#elif defined(IRIVER_IFP7XX)
#define NUM_ADC_CHANNELS 5
#define ADC_BUTTONS 0
#define ADC_BATTERY 1
#define ADC_BUTTON_PLAY 2
#define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */
#else
#define NUM_ADC_CHANNELS 8

View file

@ -26,8 +26,6 @@
(CONFIG_KEYPAD == IRIVER_H300_PAD)
#define HAS_BUTTON_HOLD
#define HAS_REMOTE_BUTTON_HOLD
#elif (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD)
#define HAS_BUTTON_HOLD
#endif
extern struct event_queue button_queue;
@ -173,26 +171,6 @@ void wheel_send_events(bool send);
#define BUTTON_REMOTE 0
#elif CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
/* iriver IFP7XX specific button codes */
#define BUTTON_PLAY 0x00000001
#define BUTTON_SELECT 0x00000002
#define BUTTON_LEFT 0x00000004
#define BUTTON_RIGHT 0x00000008
#define BUTTON_UP 0x00000010
#define BUTTON_DOWN 0x00000020
#define BUTTON_MODE 0x00000040
#define BUTTON_EQ 0x00000080
#define BUTTON_MAIN (BUTTON_PLAY|BUTTON_SELECT\
|BUTTON_LEFT|BUTTON_RIGHT|BUTTON_UP|BUTTON_DOWN\
|BUTTON_MODE|BUTTON_EQ)
#define BUTTON_REMOTE 0
#elif 0

View file

@ -1,6 +1,8 @@
/*
* This config file is for iriver iFP-799
*/
#define TARGET_TREE
#define IRIVER_IFP7XX_SERIES 1
/* For Rolo and boot loader */
@ -91,6 +93,10 @@
/* Virtual LED (icon) */
#define CONFIG_LED LED_VIRTUAL
#define MIN_CONTRAST_SETTING 5
#define MAX_CONTRAST_SETTING 63
#define DEFAULT_CONTRAST_SETTING 40
/* Define this if you have adjustable CPU frequency */
//#define HAVE_ADJUSTABLE_CPU_FREQ

3
tools/configure vendored
View file

@ -1088,6 +1088,9 @@ EOF
# toolset is the tools within the tools directory that we build for
# this particular target.
toolset=$genericbitmaptools
t_cpu="arm"
t_manufacturer="iriver"
t_model="ifp7xx"
;;
40|gigabeatf)