forked from len0rd/rockbox
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:
parent
fedfd44825
commit
6e992abf36
9 changed files with 21 additions and 125 deletions
|
@ -518,3 +518,13 @@ target/arm/ipod/power-ipod.c
|
||||||
target/arm/ipod/usb-ipod.c
|
target/arm/ipod/usb-ipod.c
|
||||||
#endif /* SIMULATOR */
|
#endif /* SIMULATOR */
|
||||||
#endif /* IPOD_MINI2G */
|
#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
|
||||||
|
|
|
@ -71,8 +71,6 @@ static inline void __backlight_on(void)
|
||||||
or_b(0x40, &PADRH); /* drive it high */
|
or_b(0x40, &PADRH); /* drive it high */
|
||||||
#elif CONFIG_BACKLIGHT == BL_GMINI
|
#elif CONFIG_BACKLIGHT == BL_GMINI
|
||||||
P1 |= 0x10;
|
P1 |= 0x10;
|
||||||
#elif CONFIG_BACKLIGHT==BL_IRIVER_IFP7XX
|
|
||||||
GPIO3_SET = 1;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,8 +85,6 @@ static inline void __backlight_off(void)
|
||||||
and_b(~0x40, &PADRH); /* drive it low */
|
and_b(~0x40, &PADRH); /* drive it low */
|
||||||
#elif CONFIG_BACKLIGHT == BL_GMINI
|
#elif CONFIG_BACKLIGHT == BL_GMINI
|
||||||
P1 &= ~0x10;
|
P1 &= ~0x10;
|
||||||
#elif CONFIG_BACKLIGHT==BL_IRIVER_IFP7XX
|
|
||||||
GPIO3_CLR = 1;
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -155,38 +155,4 @@ void adc_init(void)
|
||||||
sleep(2); /* Ensure valid readings when adc_init returns */
|
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
|
#endif
|
||||||
|
|
|
@ -75,10 +75,7 @@ static bool remote_filter_first_keypress;
|
||||||
#define REPEAT_INTERVAL_FINISH 5
|
#define REPEAT_INTERVAL_FINISH 5
|
||||||
|
|
||||||
/* the power-off button and number of repeated keys before shutting off */
|
/* the power-off button and number of repeated keys before shutting off */
|
||||||
#if (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD)
|
#if !defined(TARGET_TREE)
|
||||||
#define POWEROFF_BUTTON BUTTON_PLAY
|
|
||||||
#define POWEROFF_COUNT 40
|
|
||||||
#elif !defined(TARGET_TREE)
|
|
||||||
#define POWEROFF_BUTTON BUTTON_OFF
|
#define POWEROFF_BUTTON BUTTON_OFF
|
||||||
#define POWEROFF_COUNT 10
|
#define POWEROFF_COUNT 10
|
||||||
#endif
|
#endif
|
||||||
|
@ -506,46 +503,6 @@ static int button_read(void)
|
||||||
|| (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
|| (CONFIG_KEYPAD == IRIVER_H300_PAD)
|
||||||
btn = button_read_device(); /* temp untill TARGET_TREE is defined */
|
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
|
#elif CONFIG_KEYPAD == RECORDER_PAD
|
||||||
#ifndef HAVE_FMADC
|
#ifndef HAVE_FMADC
|
||||||
|
@ -703,12 +660,6 @@ static int button_read(void)
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG_KEYPAD == IRIVER_IFP7XX_PAD
|
|
||||||
bool button_hold(void)
|
|
||||||
{
|
|
||||||
return (GPIO5_READ & 4) ? false : true;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int button_status(void)
|
int button_status(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -144,8 +144,6 @@ void ide_power_enable(bool on)
|
||||||
P1 |= 0x08;
|
P1 |= 0x08;
|
||||||
else
|
else
|
||||||
P1 &= ~0x08;
|
P1 &= ~0x08;
|
||||||
#elif CONFIG_CPU == PNX0101
|
|
||||||
/* no ide controller */
|
|
||||||
#elif defined(TOSHIBA_GIGABEAT_F)
|
#elif defined(TOSHIBA_GIGABEAT_F)
|
||||||
/* Gigabeat TODO */
|
/* Gigabeat TODO */
|
||||||
#else /* SH1 based archos */
|
#else /* SH1 based archos */
|
||||||
|
@ -222,10 +220,7 @@ bool ide_powered(void)
|
||||||
void power_off(void)
|
void power_off(void)
|
||||||
{
|
{
|
||||||
set_irq_level(HIGHEST_IRQ_LEVEL);
|
set_irq_level(HIGHEST_IRQ_LEVEL);
|
||||||
#if CONFIG_CPU == PNX0101
|
#if defined(GMINI_ARCH)
|
||||||
GPIO1_CLR = 1 << 16;
|
|
||||||
GPIO2_SET = 1;
|
|
||||||
#elif defined(GMINI_ARCH)
|
|
||||||
P1 &= ~1;
|
P1 &= ~1;
|
||||||
P1CON &= ~1;
|
P1CON &= ~1;
|
||||||
#elif defined(TOSHIBA_GIGABEAT_F)
|
#elif defined(TOSHIBA_GIGABEAT_F)
|
||||||
|
|
|
@ -24,15 +24,6 @@
|
||||||
#ifdef TARGET_TREE
|
#ifdef TARGET_TREE
|
||||||
#include "adc-target.h"
|
#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
|
#else
|
||||||
|
|
||||||
#define NUM_ADC_CHANNELS 8
|
#define NUM_ADC_CHANNELS 8
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
(CONFIG_KEYPAD == IRIVER_H300_PAD)
|
(CONFIG_KEYPAD == IRIVER_H300_PAD)
|
||||||
#define HAS_BUTTON_HOLD
|
#define HAS_BUTTON_HOLD
|
||||||
#define HAS_REMOTE_BUTTON_HOLD
|
#define HAS_REMOTE_BUTTON_HOLD
|
||||||
#elif (CONFIG_KEYPAD == IRIVER_IFP7XX_PAD)
|
|
||||||
#define HAS_BUTTON_HOLD
|
|
||||||
#endif
|
#endif
|
||||||
extern struct event_queue button_queue;
|
extern struct event_queue button_queue;
|
||||||
|
|
||||||
|
@ -173,26 +171,6 @@ void wheel_send_events(bool send);
|
||||||
|
|
||||||
#define BUTTON_REMOTE 0
|
#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
|
#elif 0
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
/*
|
/*
|
||||||
* This config file is for iriver iFP-799
|
* This config file is for iriver iFP-799
|
||||||
*/
|
*/
|
||||||
|
#define TARGET_TREE
|
||||||
|
|
||||||
#define IRIVER_IFP7XX_SERIES 1
|
#define IRIVER_IFP7XX_SERIES 1
|
||||||
|
|
||||||
/* For Rolo and boot loader */
|
/* For Rolo and boot loader */
|
||||||
|
@ -91,6 +93,10 @@
|
||||||
/* Virtual LED (icon) */
|
/* Virtual LED (icon) */
|
||||||
#define CONFIG_LED LED_VIRTUAL
|
#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 this if you have adjustable CPU frequency */
|
||||||
//#define HAVE_ADJUSTABLE_CPU_FREQ
|
//#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||||
|
|
||||||
|
|
3
tools/configure
vendored
3
tools/configure
vendored
|
@ -1088,6 +1088,9 @@ EOF
|
||||||
# toolset is the tools within the tools directory that we build for
|
# toolset is the tools within the tools directory that we build for
|
||||||
# this particular target.
|
# this particular target.
|
||||||
toolset=$genericbitmaptools
|
toolset=$genericbitmaptools
|
||||||
|
t_cpu="arm"
|
||||||
|
t_manufacturer="iriver"
|
||||||
|
t_model="ifp7xx"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
40|gigabeatf)
|
40|gigabeatf)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue