diff options
-rw-r--r-- | apps/plugins/battery_bench.c | 5 | ||||
-rw-r--r-- | apps/plugins/metronome.c | 10 | ||||
-rw-r--r-- | firmware/SOURCES | 2 | ||||
-rw-r--r-- | firmware/export/config-h10.h | 8 | ||||
-rw-r--r-- | firmware/export/config-h10_5gb.h | 8 | ||||
-rw-r--r-- | firmware/system.c | 10 | ||||
-rwxr-xr-x | firmware/target/arm/iriver/h10/adc-h10.c | 41 | ||||
-rw-r--r-- | firmware/target/arm/iriver/h10/lcd-h10.c | 16 |
8 files changed, 92 insertions, 8 deletions
diff --git a/apps/plugins/battery_bench.c b/apps/plugins/battery_bench.c index 210ecbd9dd..9400bd2018 100644 --- a/apps/plugins/battery_bench.c +++ b/apps/plugins/battery_bench.c @@ -77,6 +77,11 @@ PLUGIN_HEADER #define BATTERY_ON BUTTON_SELECT #define BATTERY_OFF BUTTON_PLAY +#elif CONFIG_KEYPAD == IRIVER_H10_PAD + +#define BATTERY_ON BUTTON_PLAY +#define BATTERY_OFF BUTTON_POWER + #endif diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index 04ebdae1c0..5e83fca119 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c @@ -93,6 +93,16 @@ PLUGIN_HEADER #define METRONOME_R_VOL_UP BUTTON_RC_VOL_UP #define METRONOME_R_VOL_DOWN BUTTON_RC_VOL_DOWN #define METRONOME_R_TAP BUTTON_RC_BITRATE + +#elif CONFIG_KEYPAD == IRIVER_H10_PAD +#define METRONOME_QUIT BUTTON_POWER +#define METRONOME_PLAYPAUSE BUTTON_PLAY +#define METRONOME_VOL_UP BUTTON_SCROLL_UP +#define METRONOME_VOL_DOWN BUTTON_SCROLL_DOWN +#define METRONOME_TAP BUTTON_FF +#define METRONOME_MSG_START "press play" +#define METRONOME_MSG_STOP "press pause" + #endif static struct plugin_api* rb; diff --git a/firmware/SOURCES b/firmware/SOURCES index f313dcd902..8826337f4e 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES @@ -259,6 +259,7 @@ target/arm/ata-pp5020.c target/arm/iriver/h10/power-h10.c target/arm/iriver/h10/usb-h10.c target/arm/iriver/h10/lcd-h10.c +target/arm/iriver/h10/adc-h10.c #endif #endif @@ -270,6 +271,7 @@ target/arm/ata-pp5020.c target/arm/iriver/h10/power-h10.c target/arm/iriver/h10/usb-h10.c target/arm/iriver/h10/lcd-h10.c +target/arm/iriver/h10/adc-h10.c #endif #endif diff --git a/firmware/export/config-h10.h b/firmware/export/config-h10.h index 099df0d715..d225baddbe 100644 --- a/firmware/export/config-h10.h +++ b/firmware/export/config-h10.h @@ -37,7 +37,7 @@ /* define this if you have a real-time clock */ #ifndef BOOTLOADER -#define CONFIG_RTC RTC_E8564 /* TODO: figure this out */ +/*#define CONFIG_RTC RTC_E8564*/ /* TODO: figure this out */ #endif /* Define this if you have a software controlled poweroff */ @@ -99,6 +99,8 @@ /* Type of LCD */ #define CONFIG_LCD LCD_H10 +#define DEFAULT_CONTRAST_SETTING 19 + /* Offset ( in the firmware file's header ) to the file length */ #define FIRMWARE_OFFSET_FILE_LENGTH 0 @@ -111,13 +113,13 @@ /* #define USB_IPODSTYLE */ /* define this if the unit can be powered or charged via USB */ -#define HAVE_USB_POWER +/*#define HAVE_USB_POWER*/ /* Virtual LED (icon) */ #define CONFIG_LED LED_VIRTUAL /* Define this if you have adjustable CPU frequency */ -#define HAVE_ADJUSTABLE_CPU_FREQ +/*#define HAVE_ADJUSTABLE_CPU_FREQ*/ #define BOOTFILE_EXT "h10" #define BOOTFILE "rockbox." BOOTFILE_EXT diff --git a/firmware/export/config-h10_5gb.h b/firmware/export/config-h10_5gb.h index c5aaceb573..b4ff34b612 100644 --- a/firmware/export/config-h10_5gb.h +++ b/firmware/export/config-h10_5gb.h @@ -38,7 +38,7 @@ /* define this if you have a real-time clock */ #ifndef BOOTLOADER -#define CONFIG_RTC RTC_E8564 /* TODO: figure this out */ +/*#define CONFIG_RTC RTC_E8564*/ /* TODO: figure this out */ #endif /* Define this if you have a software controlled poweroff */ @@ -98,6 +98,8 @@ /* Type of LCD */ #define CONFIG_LCD LCD_H10_5GB +#define DEFAULT_CONTRAST_SETTING 19 + /* Offset ( in the firmware file's header ) to the file length */ #define FIRMWARE_OFFSET_FILE_LENGTH 0 @@ -110,13 +112,13 @@ /* #define USB_IPODSTYLE */ /* define this if the unit can be powered or charged via USB */ -#define HAVE_USB_POWER +/*#define HAVE_USB_POWER*/ /* Virtual LED (icon) */ #define CONFIG_LED LED_VIRTUAL /* Define this if you have adjustable CPU frequency */ -#define HAVE_ADJUSTABLE_CPU_FREQ +/*#define HAVE_ADJUSTABLE_CPU_FREQ*/ #define BOOTFILE_EXT "h10" #define BOOTFILE "rockbox." BOOTFILE_EXT diff --git a/firmware/system.c b/firmware/system.c index 2767f50edc..c97b5233ec 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -1162,6 +1162,16 @@ void irq(void) else if (CPU_HI_INT_STAT & GPIO_MASK) ipod_mini_button_int(); } +#elif (defined IRIVER_H10) || (defined IRIVER_H10_5GB) +/* TODO: this should really be in the target tree, but moving it there caused + crt0.S not to find it while linking */ +void irq(void) +{ + if (CPU_INT_STAT & TIMER1_MASK) + TIMER1(); + else if (CPU_INT_STAT & TIMER2_MASK) + TIMER2(); +} #else extern void ipod_4g_button_int(void); diff --git a/firmware/target/arm/iriver/h10/adc-h10.c b/firmware/target/arm/iriver/h10/adc-h10.c new file mode 100755 index 0000000000..0e17ae4f91 --- /dev/null +++ b/firmware/target/arm/iriver/h10/adc-h10.c @@ -0,0 +1,41 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2006 by Barry Wardell + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ +#include "config.h" +#include "cpu.h" +#include "system.h" +#include "kernel.h" +#include "thread.h" +#include "adc.h" + +/* TODO: implement adc functionality */ +unsigned short adc_scan(int channel) +{ + (void)channel; + return 0; +} + +unsigned short adc_read(int channel) +{ + (void)channel; + return 0; +} + +void adc_init(void) +{ +} diff --git a/firmware/target/arm/iriver/h10/lcd-h10.c b/firmware/target/arm/iriver/h10/lcd-h10.c index 022dc22208..7367bdc09b 100644 --- a/firmware/target/arm/iriver/h10/lcd-h10.c +++ b/firmware/target/arm/iriver/h10/lcd-h10.c @@ -155,14 +155,26 @@ void lcd_blit(const fb_data* data, int x, int by, int width, (void)stride; } - +void lcd_yuv_blit(unsigned char * const src[3], + int src_x, int src_y, int stride, + int x, int y, int width, int height) +{ + (void)src; + (void)src_x; + (void)src_y; + (void)stride; + (void)x; + (void)y; + (void)width; + (void)height; +} /* Update a fraction of the display. */ void lcd_update_rect(int x, int y, int width, int height) { int y0, x0, y1, x1; - int newx,newwidth; + /*int newx,newwidth;*/ unsigned long *addr = (unsigned long *)lcd_framebuffer; |