Merry Christmas Gogear HDD6330 owners! This is the start of the HDD6330 port. At the moment, it's essentially a copy of the HDD1630 port with a minimal LCD driver. The touchpad doesn't work as expected, but you can still kind of navigate and listen to music/radio.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24112 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
4a85eb7d9f
commit
6908cc5235
28 changed files with 1215 additions and 33 deletions
|
@ -239,6 +239,8 @@ keymaps/keymap-creativezv.c
|
|||
keymaps/keymap-sa9200.c
|
||||
#elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
|
||||
keymaps/keymap-hdd1630.c
|
||||
#elif CONFIG_KEYPAD == PHILIPS_HDD6330_PAD
|
||||
keymaps/keymap-hdd6330.c
|
||||
#elif CONFIG_KEYPAD == IAUDIO67_PAD
|
||||
keymaps/keymap-iaudio67.c
|
||||
#elif CONFIG_KEYPAD == SANSA_C100_PAD
|
||||
|
|
|
@ -977,7 +977,8 @@ static bool dbg_spdif(void)
|
|||
|
||||
/* This is temporary until the SA9200 touchpad works */
|
||||
#elif (CONFIG_KEYPAD == PHILIPS_SA9200_PAD) || \
|
||||
(CONFIG_KEYPAD == PHILIPS_HDD1630_PAD)
|
||||
(CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \
|
||||
(CONFIG_KEYPAD == PHILIPS_HDD6330_PAD)
|
||||
# define DEBUG_CANCEL BUTTON_POWER
|
||||
|
||||
#elif (CONFIG_KEYPAD == SAMSUNG_YH_PAD)
|
||||
|
@ -1142,7 +1143,7 @@ extern unsigned char serbuf[];
|
|||
adc_read(ADC_BATTERY), adc_read(ADC_UNKNOWN_1));
|
||||
lcd_putsf(0, line++, "REM: %03x PAD: %03x",
|
||||
adc_read(ADC_REMOTE), adc_read(ADC_SCROLLPAD));
|
||||
#elif defined(PHILIPS_HDD1630)
|
||||
#elif defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330)
|
||||
line++;
|
||||
lcd_putsf(0, line++, "BATT: %03x UNK1: %03x",
|
||||
adc_read(ADC_BATTERY), adc_read(ADC_UNKNOWN_1));
|
||||
|
|
465
apps/keymaps/keymap-hdd6330.c
Normal file
465
apps/keymaps/keymap-hdd6330.c
Normal file
|
@ -0,0 +1,465 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2008 Mark Arigo
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
/* Button Code Definitions for the toshiba gigabeat target */
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "action.h"
|
||||
#include "button.h"
|
||||
#include "settings.h"
|
||||
|
||||
/*
|
||||
* The format of the list is as follows
|
||||
* { Action Code, Button code, Prereq button code }
|
||||
* if there's no need to check the previous button's value, use BUTTON_NONE
|
||||
* Insert LAST_ITEM_IN_LIST at the end of each mapping
|
||||
*/
|
||||
|
||||
/* CONTEXT_CUSTOM's used in this file...
|
||||
|
||||
CONTEXT_CUSTOM|CONTEXT_TREE = the standard list/tree defines (without directions)
|
||||
CONTEXT_CUSTOM|CONTEXT_SETTINGS = the direction keys for the eq/col picker screens
|
||||
i.e where up/down is inc/dec
|
||||
CONTEXT_SETTINGS = up/down is prev/next, l/r is inc/dec
|
||||
|
||||
*/
|
||||
|
||||
|
||||
static const struct button_mapping button_context_standard[] = {
|
||||
{ ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
{ ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||
|
||||
{ ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT,BUTTON_SELECT },
|
||||
|
||||
{ ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
||||
{ ACTION_STD_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
|
||||
|
||||
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
||||
{ ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_standard */
|
||||
|
||||
|
||||
static const struct button_mapping button_context_wps[] = {
|
||||
{ ACTION_WPS_PLAY, BUTTON_VIEW|BUTTON_REL, BUTTON_VIEW },
|
||||
{ ACTION_WPS_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
|
||||
{ ACTION_WPS_SKIPNEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
||||
{ ACTION_WPS_SKIPPREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
|
||||
|
||||
{ ACTION_WPS_SEEKBACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_SEEKFWD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
|
||||
{ ACTION_WPS_STOPSEEK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
|
||||
|
||||
{ ACTION_WPS_ABSETB_NEXTDIR, BUTTON_VIEW|BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_WPS_ABSETA_PREVDIR, BUTTON_VIEW|BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_WPS_ABRESET, BUTTON_VIEW|BUTTON_SELECT, BUTTON_NONE },
|
||||
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_WPS_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
|
||||
{ ACTION_WPS_PITCHSCREEN, BUTTON_VIEW|BUTTON_UP, BUTTON_VIEW },
|
||||
{ ACTION_WPS_VIEW_PLAYLIST, BUTTON_VIEW|BUTTON_DOWN, BUTTON_VIEW },
|
||||
|
||||
{ ACTION_WPS_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
||||
{ ACTION_WPS_MENU, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
|
||||
{ ACTION_WPS_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
|
||||
|
||||
{ ACTION_WPS_ID3SCREEN, BUTTON_VIEW|BUTTON_MENU, BUTTON_NONE },
|
||||
{ ACTION_WPS_BROWSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
||||
|
||||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_wps */
|
||||
|
||||
static const struct button_mapping button_context_list[] = {
|
||||
{ ACTION_LISTTREE_PGUP, BUTTON_VIEW|BUTTON_UP, BUTTON_VIEW },
|
||||
{ ACTION_LISTTREE_PGUP, BUTTON_UP|BUTTON_REL, BUTTON_VIEW|BUTTON_UP },
|
||||
{ ACTION_LISTTREE_PGUP, BUTTON_VIEW|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_LISTTREE_PGDOWN, BUTTON_VIEW|BUTTON_DOWN, BUTTON_VIEW },
|
||||
{ ACTION_LISTTREE_PGDOWN, BUTTON_DOWN|BUTTON_REL, BUTTON_VIEW|BUTTON_DOWN },
|
||||
{ ACTION_LISTTREE_PGDOWN, BUTTON_VIEW|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
#ifdef HAVE_VOLUME_IN_LIST
|
||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLUP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_LIST_VOLDOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
#endif
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_list */
|
||||
|
||||
static const struct button_mapping button_context_tree[] = {
|
||||
{ ACTION_TREE_WPS, BUTTON_VIEW|BUTTON_REL, BUTTON_VIEW },
|
||||
{ ACTION_TREE_STOP, BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
{ ACTION_TREE_STOP, BUTTON_POWER|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST)
|
||||
}; /* button_context_tree */
|
||||
|
||||
static const struct button_mapping button_context_listtree_scroll_with_combo[] = {
|
||||
{ ACTION_NONE, BUTTON_VIEW, BUTTON_NONE },
|
||||
{ ACTION_TREE_PGLEFT, BUTTON_VIEW|BUTTON_LEFT, BUTTON_VIEW },
|
||||
{ ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_VIEW|BUTTON_LEFT },
|
||||
{ ACTION_TREE_PGLEFT, BUTTON_VIEW|BUTTON_LEFT, BUTTON_LEFT|BUTTON_REL },
|
||||
{ ACTION_TREE_ROOT_INIT, BUTTON_VIEW|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_VIEW|BUTTON_LEFT },
|
||||
{ ACTION_TREE_PGLEFT, BUTTON_VIEW|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_TREE_PGRIGHT, BUTTON_VIEW|BUTTON_RIGHT, BUTTON_VIEW },
|
||||
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_VIEW|BUTTON_RIGHT },
|
||||
{ ACTION_TREE_PGRIGHT, BUTTON_VIEW|BUTTON_RIGHT, BUTTON_RIGHT|BUTTON_REL },
|
||||
{ ACTION_TREE_PGRIGHT, BUTTON_VIEW|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_listtree_scroll_without_combo[] = {
|
||||
{ ACTION_NONE, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
|
||||
{ ACTION_TREE_ROOT_INIT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
|
||||
{ ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_TREE_PGLEFT, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT|BUTTON_REPEAT },
|
||||
{ ACTION_NONE, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
||||
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_TREE_PGRIGHT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT|BUTTON_REPEAT },
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_TREE),
|
||||
};
|
||||
|
||||
static const struct button_mapping button_context_settings[] = {
|
||||
{ ACTION_SETTINGS_INC, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INCREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DEC, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DECREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_PREV, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_STD_PREVREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXTREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_RESET, BUTTON_VIEW, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_settings */
|
||||
|
||||
static const struct button_mapping button_context_settings_right_is_inc[] = {
|
||||
{ ACTION_SETTINGS_INC, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_INCREPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DEC, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_DECREPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_SETTINGS_RESET, BUTTON_VIEW, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_settingsgraphical */
|
||||
|
||||
static const struct button_mapping button_context_yesno[] = {
|
||||
{ ACTION_YESNO_ACCEPT, BUTTON_SELECT, BUTTON_NONE },
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_settings_yesno */
|
||||
|
||||
static const struct button_mapping button_context_colorchooser[] = {
|
||||
{ ACTION_STD_OK, BUTTON_VIEW|BUTTON_REL, BUTTON_NONE },
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
||||
}; /* button_context_colorchooser */
|
||||
|
||||
static const struct button_mapping button_context_eq[] = {
|
||||
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|CONTEXT_SETTINGS),
|
||||
}; /* button_context_eq */
|
||||
|
||||
/** Bookmark Screen **/
|
||||
static const struct button_mapping button_context_bmark[] = {
|
||||
{ ACTION_BMS_DELETE, BUTTON_VIEW, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_LIST),
|
||||
}; /* button_context_bmark */
|
||||
|
||||
static const struct button_mapping button_context_time[] = {
|
||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_STD_OK, BUTTON_VIEW, BUTTON_NONE },
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS),
|
||||
}; /* button_context_time */
|
||||
|
||||
static const struct button_mapping button_context_quickscreen[] = {
|
||||
{ ACTION_QS_TOP, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_QS_TOP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_QS_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_QS_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_QS_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_QS_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_QS_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_QS_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_STD_CANCEL, BUTTON_MENU, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_quickscreen */
|
||||
|
||||
static const struct button_mapping button_context_pitchscreen[] = {
|
||||
{ ACTION_PS_INC_SMALL, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_PS_INC_BIG, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_PS_DEC_SMALL, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_PS_DEC_BIG, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_PS_NUDGE_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_PS_NUDGE_LEFTOFF, BUTTON_LEFT|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_PS_NUDGE_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_PS_NUDGE_RIGHTOFF, BUTTON_RIGHT|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_PS_TOGGLE_MODE, BUTTON_MENU, BUTTON_NONE },
|
||||
{ ACTION_PS_RESET, BUTTON_VIEW, BUTTON_NONE },
|
||||
{ ACTION_PS_EXIT, BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_PS_SLOWER, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_PS_FASTER, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
|
||||
}; /* button_context_pitchcreen */
|
||||
|
||||
static const struct button_mapping button_context_keyboard[] = {
|
||||
{ ACTION_KBD_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_KBD_LEFT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_KBD_RIGHT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_VIEW|BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_LEFT, BUTTON_VIEW|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_VIEW|BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_KBD_CURSOR_RIGHT, BUTTON_VIEW|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_SELECT, BUTTON_SELECT, BUTTON_NONE },
|
||||
{ ACTION_KBD_PAGE_FLIP, BUTTON_VIEW|BUTTON_MENU, BUTTON_NONE },
|
||||
{ ACTION_KBD_DONE, BUTTON_VIEW|BUTTON_REL, BUTTON_VIEW },
|
||||
{ ACTION_KBD_ABORT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
{ ACTION_KBD_BACKSPACE, BUTTON_MENU, BUTTON_NONE },
|
||||
{ ACTION_KBD_BACKSPACE, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_UP, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_KBD_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_KBD_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_KBD_MORSE_INPUT, BUTTON_VIEW|BUTTON_POWER, BUTTON_NONE },
|
||||
{ ACTION_KBD_MORSE_SELECT, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_keyboard */
|
||||
|
||||
#if CONFIG_TUNER
|
||||
static const struct button_mapping button_context_radio[] = {
|
||||
{ ACTION_FM_MENU, BUTTON_MENU | BUTTON_REL, BUTTON_MENU },
|
||||
{ ACTION_FM_MODE, BUTTON_MENU | BUTTON_REPEAT, BUTTON_MENU },
|
||||
{ ACTION_FM_PRESET, BUTTON_VIEW, BUTTON_NONE },
|
||||
{ ACTION_FM_PLAY, BUTTON_SELECT | BUTTON_REL, BUTTON_SELECT },
|
||||
{ ACTION_FM_STOP, BUTTON_SELECT | BUTTON_REPEAT, BUTTON_SELECT },
|
||||
{ ACTION_FM_EXIT, BUTTON_POWER, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_SETTINGS)
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef USB_ENABLE_HID
|
||||
static const struct button_mapping button_context_usb_hid[] = {
|
||||
{ ACTION_USB_HID_MODE_SWITCH_NEXT, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||
{ ACTION_USB_HID_MODE_SWITCH_PREV, BUTTON_POWER|BUTTON_REPEAT, BUTTON_POWER },
|
||||
|
||||
LAST_ITEM_IN_LIST
|
||||
}; /* button_context_usb_hid */
|
||||
|
||||
static const struct button_mapping button_context_usb_hid_mode_multimedia[] = {
|
||||
{ ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_VOLUME_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_VOLUME_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_VOLUME_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_VOLUME_MUTE, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_PLAY_PAUSE, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_STOP, BUTTON_PLAYLIST|BUTTON_REL, BUTTON_PLAYLIST },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_PREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
|
||||
{ ACTION_USB_HID_MULTIMEDIA_PLAYBACK_TRACK_NEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||
}; /* button_context_usb_hid_mode_multimedia */
|
||||
|
||||
static const struct button_mapping button_context_usb_hid_mode_presentation[] = {
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDESHOW_START, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDESHOW_START, BUTTON_VIEW|BUTTON_REL, BUTTON_VIEW },
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDESHOW_LEAVE, BUTTON_VIEW|BUTTON_REPEAT, BUTTON_VIEW },
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDE_PREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDE_NEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDE_FIRST, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
|
||||
{ ACTION_USB_HID_PRESENTATION_SLIDE_LAST, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
|
||||
{ ACTION_USB_HID_PRESENTATION_SCREEN_BLACK, BUTTON_PLAYLIST|BUTTON_REL, BUTTON_PLAYLIST },
|
||||
{ ACTION_USB_HID_PRESENTATION_SCREEN_WHITE, BUTTON_PLAYLIST|BUTTON_REPEAT, BUTTON_PLAYLIST },
|
||||
{ ACTION_USB_HID_PRESENTATION_LINK_PREV, BUTTON_VOL_UP|BUTTON_REL, BUTTON_VOL_UP },
|
||||
{ ACTION_USB_HID_PRESENTATION_LINK_PREV, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_VOL_UP },
|
||||
{ ACTION_USB_HID_PRESENTATION_LINK_NEXT, BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_VOL_DOWN },
|
||||
{ ACTION_USB_HID_PRESENTATION_LINK_NEXT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_VOL_DOWN },
|
||||
{ ACTION_USB_HID_PRESENTATION_MOUSE_CLICK, BUTTON_MENU|BUTTON_REL, BUTTON_MENU },
|
||||
{ ACTION_USB_HID_PRESENTATION_MOUSE_OVER, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||
}; /* button_context_usb_hid_mode_presentation */
|
||||
|
||||
static const struct button_mapping button_context_usb_hid_mode_browser[] = {
|
||||
{ ACTION_USB_HID_BROWSER_SCROLL_UP, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_BROWSER_SCROLL_UP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_BROWSER_SCROLL_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_BROWSER_SCROLL_DOWN, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_BROWSER_SCROLL_PAGE_UP, BUTTON_VOL_UP|BUTTON_REL, BUTTON_VOL_UP },
|
||||
{ ACTION_USB_HID_BROWSER_SCROLL_PAGE_DOWN, BUTTON_VOL_DOWN|BUTTON_REL, BUTTON_VOL_DOWN },
|
||||
{ ACTION_USB_HID_BROWSER_ZOOM_IN, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_VOL_UP },
|
||||
{ ACTION_USB_HID_BROWSER_ZOOM_OUT, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_VOL_DOWN },
|
||||
{ ACTION_USB_HID_BROWSER_ZOOM_RESET, BUTTON_MENU|BUTTON_REPEAT, BUTTON_MENU },
|
||||
{ ACTION_USB_HID_BROWSER_TAB_PREV, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT },
|
||||
{ ACTION_USB_HID_BROWSER_TAB_NEXT, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT },
|
||||
{ ACTION_USB_HID_BROWSER_TAB_CLOSE, BUTTON_PLAYLIST|BUTTON_REPEAT, BUTTON_PLAYLIST },
|
||||
{ ACTION_USB_HID_BROWSER_HISTORY_BACK, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT },
|
||||
{ ACTION_USB_HID_BROWSER_HISTORY_FORWARD, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
|
||||
{ ACTION_USB_HID_BROWSER_VIEW_FULL_SCREEN, BUTTON_VIEW|BUTTON_REL, BUTTON_VIEW },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||
}; /* button_context_usb_hid_mode_browser */
|
||||
|
||||
#ifdef HAVE_USB_HID_MOUSE
|
||||
static const struct button_mapping button_context_usb_hid_mode_mouse[] = {
|
||||
{ ACTION_USB_HID_MOUSE_UP, BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_UP_REP, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_DOWN, BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_DOWN_REP, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LEFT, BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LEFT_REP, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RIGHT, BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RIGHT_REP, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_SELECT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_SELECT|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_SELECT|BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_SELECT|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_SELECT|BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_SELECT|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_SELECT|BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_SELECT|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_SELECT|BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_SELECT|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT, BUTTON_PLAYLIST, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_BUTTON_LEFT_REL, BUTTON_PLAYLIST|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP, BUTTON_PLAYLIST|BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_UP_REP, BUTTON_PLAYLIST|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN, BUTTON_PLAYLIST|BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_DOWN_REP, BUTTON_PLAYLIST|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT, BUTTON_PLAYLIST|BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_LEFT_REP, BUTTON_PLAYLIST|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT, BUTTON_PLAYLIST|BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_LDRAG_RIGHT_REP, BUTTON_PLAYLIST|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT, BUTTON_VIEW, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_BUTTON_RIGHT_REL, BUTTON_VIEW|BUTTON_REL, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP, BUTTON_VIEW|BUTTON_UP, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RDRAG_UP_REP, BUTTON_VIEW|BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN, BUTTON_VIEW|BUTTON_DOWN, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RDRAG_DOWN_REP, BUTTON_VIEW|BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT, BUTTON_VIEW|BUTTON_LEFT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RDRAG_LEFT_REP, BUTTON_VIEW|BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT, BUTTON_VIEW|BUTTON_RIGHT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_RDRAG_RIGHT_REP, BUTTON_VIEW|BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_UP, BUTTON_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN, BUTTON_NONE },
|
||||
{ ACTION_USB_HID_MOUSE_WHEEL_SCROLL_DOWN, BUTTON_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||
|
||||
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_USB_HID)
|
||||
|
||||
}; /* button_context_usb_hid_mode_mouse */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
const struct button_mapping* get_context_mapping(int context)
|
||||
{
|
||||
switch (context)
|
||||
{
|
||||
case CONTEXT_STD:
|
||||
return button_context_standard;
|
||||
case CONTEXT_WPS:
|
||||
return button_context_wps;
|
||||
|
||||
case CONTEXT_LIST:
|
||||
return button_context_list;
|
||||
case CONTEXT_MAINMENU:
|
||||
case CONTEXT_TREE:
|
||||
if (global_settings.hold_lr_for_scroll_in_list)
|
||||
return button_context_listtree_scroll_without_combo;
|
||||
else
|
||||
return button_context_listtree_scroll_with_combo;
|
||||
case CONTEXT_CUSTOM|CONTEXT_TREE:
|
||||
return button_context_tree;
|
||||
|
||||
case CONTEXT_SETTINGS:
|
||||
return button_context_settings;
|
||||
case CONTEXT_CUSTOM|CONTEXT_SETTINGS:
|
||||
return button_context_settings_right_is_inc;
|
||||
|
||||
case CONTEXT_SETTINGS_COLOURCHOOSER:
|
||||
return button_context_colorchooser;
|
||||
case CONTEXT_SETTINGS_EQ:
|
||||
return button_context_eq;
|
||||
|
||||
case CONTEXT_SETTINGS_TIME:
|
||||
return button_context_time;
|
||||
|
||||
case CONTEXT_YESNOSCREEN:
|
||||
return button_context_yesno;
|
||||
case CONTEXT_BOOKMARKSCREEN:
|
||||
return button_context_bmark;
|
||||
case CONTEXT_QUICKSCREEN:
|
||||
return button_context_quickscreen;
|
||||
case CONTEXT_PITCHSCREEN:
|
||||
return button_context_pitchscreen;
|
||||
case CONTEXT_KEYBOARD:
|
||||
return button_context_keyboard;
|
||||
#if CONFIG_TUNER
|
||||
case CONTEXT_FM:
|
||||
return button_context_radio;
|
||||
#endif
|
||||
#ifdef USB_ENABLE_HID
|
||||
case CONTEXT_USB_HID:
|
||||
return button_context_usb_hid;
|
||||
case CONTEXT_USB_HID_MODE_MULTIMEDIA:
|
||||
return button_context_usb_hid_mode_multimedia;
|
||||
case CONTEXT_USB_HID_MODE_PRESENTATION:
|
||||
return button_context_usb_hid_mode_presentation;
|
||||
case CONTEXT_USB_HID_MODE_BROWSER:
|
||||
return button_context_usb_hid_mode_browser;
|
||||
#ifdef HAVE_USB_HID_MOUSE
|
||||
case CONTEXT_USB_HID_MODE_MOUSE:
|
||||
return button_context_usb_hid_mode_mouse;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
return button_context_standard;
|
||||
}
|
|
@ -12,9 +12,9 @@ gigabeat-s.c
|
|||
#elif defined(IRIVER_H10) || defined(IRIVER_H10_5GB) || \
|
||||
defined(SANSA_E200) || defined(SANSA_C200) || \
|
||||
defined(MROBE_100) || defined(PHILIPS_SA9200) || \
|
||||
defined(PHILIPS_HDD1630) || defined(SAMSUNG_YH820) || \
|
||||
defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925) || \
|
||||
defined(SANSA_VIEW)
|
||||
defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330) || \
|
||||
defined(SAMSUNG_YH820) || defined(SAMSUNG_YH920) || \
|
||||
defined(SAMSUNG_YH925) || defined(SANSA_VIEW)
|
||||
#ifdef E200R_INSTALLER
|
||||
main-e200r-installer.c
|
||||
#elif defined(C240_ERASE)
|
||||
|
|
|
@ -40,9 +40,11 @@
|
|||
on a button press - currently only the ipod, H10 and Sansa versions do. */
|
||||
#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) \
|
||||
|| defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F) \
|
||||
|| defined(PHILIPS_SA9200) || (CONFIG_CPU == AS3525) || defined(COWON_D2) \
|
||||
|| defined(MROBE_100) || defined(PHILIPS_HDD1630) || defined(MROBE_500) \
|
||||
|| defined(SAMSUNG_YH925) || defined(SAMSUNG_YH920) || defined(SAMSUNG_YH820) \
|
||||
|| (CONFIG_CPU == AS3525) || defined(COWON_D2) \
|
||||
|| defined(MROBE_100) || defined(MROBE_500) \
|
||||
|| defined(SAMSUNG_YH925) || defined(SAMSUNG_YH920) \
|
||||
|| defined(SAMSUNG_YH820) || defined(PHILIPS_SA9200) \
|
||||
|| defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330) \
|
||||
|| defined(ONDA_VX747)
|
||||
bool verbose = false;
|
||||
#else
|
||||
|
|
|
@ -75,6 +75,9 @@ extern int show_logo(void);
|
|||
#elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
|
||||
#define BOOTLOADER_BOOT_OF BUTTON_MENU
|
||||
|
||||
#elif CONFIG_KEYPAD == PHILIPS_HDD6330_PAD
|
||||
#define BOOTLOADER_BOOT_OF BUTTON_VOL_UP
|
||||
|
||||
#elif CONFIG_KEYPAD == SAMSUNG_YH_PAD
|
||||
#define BOOTLOADER_BOOT_OF BUTTON_LEFT
|
||||
|
||||
|
@ -603,7 +606,7 @@ void* main(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(PHILIPS_HDD1630)
|
||||
#if defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330)
|
||||
printf("Trying /System/OF.ebn");
|
||||
rc=load_mi4(loadbuffer, "/System/OF.ebn", MAX_LOADSIZE);
|
||||
if (rc < EOK) {
|
||||
|
|
|
@ -636,17 +636,37 @@ target/arm/ata-pp5020.c
|
|||
target/arm/wmcodec-pp.c
|
||||
target/arm/i2s-pp.c
|
||||
target/arm/adc-pp5020.c
|
||||
target/arm/philips/hdd1630/backlight-hdd1630.c
|
||||
target/arm/philips/backlight-hdd.c
|
||||
target/arm/philips/power-hdd.c
|
||||
target/arm/philips/fmradio_i2c-hdd.c
|
||||
target/arm/philips/hdd1630/button-hdd1630.c
|
||||
target/arm/philips/hdd1630/fmradio_i2c-hdd1630.c
|
||||
target/arm/philips/hdd1630/lcd-hdd1630.c
|
||||
target/arm/philips/hdd1630/lcd-as-hdd1630.S
|
||||
target/arm/philips/hdd1630/power-hdd1630.c
|
||||
target/arm/philips/hdd1630/powermgmt-hdd1630.c
|
||||
target/arm/usb-fw-pp502x.c
|
||||
#endif /* SIMULATOR */
|
||||
#endif /* PHILIPS_HDD1630 */
|
||||
|
||||
#ifdef PHILIPS_HDD6330
|
||||
#ifndef SIMULATOR
|
||||
#ifndef BOOTLOADER
|
||||
drivers/synaptics-mep.c
|
||||
#endif /* BOOTLOADER */
|
||||
target/arm/ata-as-arm.S
|
||||
target/arm/ata-pp5020.c
|
||||
target/arm/wmcodec-pp.c
|
||||
target/arm/i2s-pp.c
|
||||
target/arm/adc-pp5020.c
|
||||
target/arm/philips/backlight-hdd.c
|
||||
target/arm/philips/power-hdd.c
|
||||
target/arm/philips/fmradio_i2c-hdd.c
|
||||
target/arm/philips/hdd6330/button-hdd6330.c
|
||||
target/arm/philips/hdd6330/lcd-hdd6330.c
|
||||
target/arm/philips/hdd6330/powermgmt-hdd6330.c
|
||||
target/arm/usb-fw-pp502x.c
|
||||
#endif /* SIMULATOR */
|
||||
#endif /* PHILIPS_HDD6330 */
|
||||
|
||||
#ifdef IAUDIO_X5
|
||||
#ifndef SIMULATOR
|
||||
target/coldfire/ata-as-coldfire.S
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_VAL, 0x4)
|
||||
#define DATA_CL GPIO_CLEAR_BITWISE(GPIOD_OUTPUT_EN, 0x4)
|
||||
|
||||
#elif defined(PHILIPS_HDD1630)
|
||||
#elif defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330)
|
||||
#define INT_ENABLE GPIO_CLEAR_BITWISE(GPIOA_INT_LEV, 0x20);\
|
||||
GPIO_SET_BITWISE(GPIOA_INT_EN, 0x20)
|
||||
#define INT_DISABLE GPIO_CLEAR_BITWISE(GPIOA_INT_EN, 0x20);\
|
||||
|
|
|
@ -114,6 +114,7 @@
|
|||
#define ONDAVX777_PAD 39
|
||||
#define SAMSUNG_YPS3_PAD 40
|
||||
#define MINI2440_PAD 41
|
||||
#define PHILIPS_HDD6330_PAD 42
|
||||
|
||||
/* CONFIG_REMOTE_KEYPAD */
|
||||
#define H100_REMOTE 1
|
||||
|
@ -194,6 +195,7 @@
|
|||
#define LCD_VIEW 35 /* as used by the Sansa View */
|
||||
#define LCD_NANO2G 36 /* as used by the iPod Nano 2nd Generation */
|
||||
#define LCD_MINI2440 37 /* as used by the Mini2440 */
|
||||
#define LCD_HDD6330 38 /* as used by the Philips HDD6330 */
|
||||
|
||||
/* LCD_PIXELFORMAT */
|
||||
#define HORIZONTAL_PACKING 1
|
||||
|
@ -359,6 +361,8 @@ Lyre prototype 1 */
|
|||
#include "config/gogearsa9200.h"
|
||||
#elif defined(PHILIPS_HDD1630)
|
||||
#include "config/gogearhdd1630.h"
|
||||
#elif defined(PHILIPS_HDD6330)
|
||||
#include "config/gogearhdd6330.h"
|
||||
#elif defined(SANSA_C100)
|
||||
#include "config/sansac100.h"
|
||||
#elif defined(MEIZU_M6SL)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* This config file is for the Philips GoGear HDD16x0/HDD63x0
|
||||
* This config file is for the Philips GoGear HDD16x0/HDD18x0
|
||||
*/
|
||||
|
||||
#define TARGET_TREE /* this target is using the target tree system */
|
||||
|
|
202
firmware/export/config/gogearhdd6330.h
Normal file
202
firmware/export/config/gogearhdd6330.h
Normal file
|
@ -0,0 +1,202 @@
|
|||
/*
|
||||
* This config file is for the Philips GoGear HDD63x0
|
||||
*/
|
||||
|
||||
#define TARGET_TREE /* this target is using the target tree system */
|
||||
|
||||
/* For Rolo and boot loader */
|
||||
#define MODEL_NUMBER 65
|
||||
#define MODEL_NAME "Philips GoGear HDD63x0"
|
||||
|
||||
/* define this if you use an ATA controller */
|
||||
#define CONFIG_STORAGE STORAGE_ATA
|
||||
|
||||
/* define this if you have recording possibility */
|
||||
#define HAVE_RECORDING
|
||||
|
||||
/* Define bitmask of input sources - recordable bitmask can be defined
|
||||
explicitly if different */
|
||||
#define INPUT_SRC_CAPS (SRC_CAP_MIC | SRC_CAP_LINEIN | SRC_CAP_FMRADIO)
|
||||
|
||||
/* define the bitmask of hardware sample rates */
|
||||
#define HW_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_48 | \
|
||||
SAMPR_CAP_44 | SAMPR_CAP_32 | SAMPR_CAP_8)
|
||||
|
||||
/* define the bitmask of recording sample rates */
|
||||
#define REC_SAMPR_CAPS (SAMPR_CAP_96 | SAMPR_CAP_88 | SAMPR_CAP_48 | \
|
||||
SAMPR_CAP_44 | SAMPR_CAP_32 | SAMPR_CAP_8)
|
||||
|
||||
/* define this if you have a bitmap LCD display */
|
||||
#define HAVE_LCD_BITMAP
|
||||
|
||||
/* define this if you have a colour LCD */
|
||||
#define HAVE_LCD_COLOR
|
||||
|
||||
/* define this if you want album art for this target */
|
||||
#define HAVE_ALBUMART
|
||||
|
||||
/* define this to enable bitmap scaling */
|
||||
#define HAVE_BMP_SCALING
|
||||
|
||||
/* define this to enable JPEG decoding */
|
||||
#define HAVE_JPEG
|
||||
|
||||
/* define this if you have access to the quickscreen */
|
||||
#define HAVE_QUICKSCREEN
|
||||
|
||||
/* define this if you have access to the pitchscreen */
|
||||
#define HAVE_PITCHSCREEN
|
||||
|
||||
/* define this if you would like tagcache to build on this target */
|
||||
#define HAVE_TAGCACHE
|
||||
|
||||
/* LCD dimensions */
|
||||
#define LCD_WIDTH 220
|
||||
#define LCD_HEIGHT 176
|
||||
#define LCD_DEPTH 16 /* 65536 colours */
|
||||
#define LCD_PIXELFORMAT RGB565 /* rgb565 byte-swapped */
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
/* Define this if your LCD can be enabled/disabled */
|
||||
/* #define HAVE_LCD_ENABLE */
|
||||
|
||||
/* Define this if your LCD can be put to sleep. HAVE_LCD_ENABLE
|
||||
* should be defined as well.
|
||||
* We can currently put the lcd to sleep but it won't wake up properly */
|
||||
/* #define HAVE_LCD_SLEEP */
|
||||
/* #define HAVE_LCD_SLEEP_SETTING */
|
||||
#endif
|
||||
|
||||
/* define this if you can flip your LCD */
|
||||
/* #define HAVE_LCD_FLIP */
|
||||
|
||||
/* define this if you can invert the colours on your LCD */
|
||||
/* #define HAVE_LCD_INVERT */
|
||||
|
||||
/* #define IRAM_LCDFRAMEBUFFER IDATA_ATTR *//* put the lcd frame buffer in IRAM */
|
||||
|
||||
#define CONFIG_KEYPAD PHILIPS_HDD6330_PAD
|
||||
|
||||
/* Define this to enable morse code input */
|
||||
#define HAVE_MORSE_INPUT
|
||||
|
||||
/* define this if the target has volume keys which can be used in the lists */
|
||||
#define HAVE_VOLUME_IN_LIST
|
||||
|
||||
/* Define this if you do software codec */
|
||||
#define CONFIG_CODEC SWCODEC
|
||||
|
||||
/* define this if you have a real-time clock. The HDD16x0 has a PCF8563 RTC,
|
||||
but it's register compatible with the E8564. */
|
||||
#ifndef BOOTLOADER
|
||||
#define CONFIG_RTC RTC_E8564
|
||||
#define HAVE_RTC_ALARM
|
||||
#endif
|
||||
|
||||
/* Define this if you have a software controlled poweroff */
|
||||
#define HAVE_SW_POWEROFF
|
||||
|
||||
/* The number of bytes reserved for loadable codecs */
|
||||
#define CODEC_SIZE 0x100000
|
||||
|
||||
/* The number of bytes reserved for loadable plugins */
|
||||
#define PLUGIN_BUFFER_SIZE 0x80000
|
||||
|
||||
/* Define this if you have the WM8731 audio codec */
|
||||
#define HAVE_WM8731
|
||||
|
||||
/* WM8731 has no tone controls, so we use the software ones */
|
||||
#define HAVE_SW_TONE_CONTROLS
|
||||
|
||||
/* TODO: #define AB_REPEAT_ENABLE 1 */
|
||||
|
||||
/* FM Tuner */
|
||||
#define CONFIG_TUNER TEA5767
|
||||
#define CONFIG_TUNER_XTAL 32768
|
||||
|
||||
/* define this if you have a disk storage, i.e. something
|
||||
that needs spinups and can cause skips when shaked */
|
||||
#define HAVE_DISK_STORAGE
|
||||
|
||||
/* Define this for LCD backlight available */
|
||||
#define HAVE_BACKLIGHT
|
||||
#define HAVE_BACKLIGHT_BRIGHTNESS
|
||||
/* #define CONFIG_BACKLIGHT_FADING BACKLIGHT_FADING_SW_SETTING */
|
||||
|
||||
/* Main LCD backlight brightness range and defaults */
|
||||
#define MIN_BRIGHTNESS_SETTING 1
|
||||
#define MAX_BRIGHTNESS_SETTING 16
|
||||
#define DEFAULT_BRIGHTNESS_SETTING 13 /* match OF brightness */
|
||||
|
||||
/* define this if you have a light associated with the buttons */
|
||||
#define HAVE_BUTTON_LIGHT
|
||||
#define HAVE_BUTTONLIGHT_BRIGHTNESS
|
||||
|
||||
#define BATTERY_CAPACITY_DEFAULT 630 /* default battery capacity */
|
||||
#define BATTERY_CAPACITY_MIN 630 /* min. capacity selectable */
|
||||
#define BATTERY_CAPACITY_MAX 630 /* max. capacity selectable */
|
||||
#define BATTERY_CAPACITY_INC 0 /* capacity increment */
|
||||
#define BATTERY_TYPES_COUNT 1 /* only one type */
|
||||
|
||||
/* Hardware controlled charging */
|
||||
#define CONFIG_CHARGING CHARGING_SIMPLE
|
||||
|
||||
/* define this if the unit can be powered or charged via USB */
|
||||
#define HAVE_USB_POWER
|
||||
|
||||
/* Define this if you have a PortalPlayer PP5020 */
|
||||
#define CONFIG_CPU PP5022
|
||||
|
||||
/* Define this if you want to use the PP5020 i2c interface */
|
||||
#define CONFIG_I2C I2C_PP5020
|
||||
|
||||
/* define this if the hardware can be powered off while charging */
|
||||
#define HAVE_POWEROFF_WHILE_CHARGING
|
||||
|
||||
/* The start address index for ROM builds */
|
||||
#define ROM_START 0x00000000
|
||||
|
||||
/* The size of the flash ROM */
|
||||
#define FLASH_SIZE 0x100000
|
||||
|
||||
/* Define this to the CPU frequency */
|
||||
#define CPU_FREQ 75000000
|
||||
|
||||
/* Type of LCD */
|
||||
#define CONFIG_LCD LCD_HDD6330
|
||||
|
||||
/* Define this if your LCD can set contrast */
|
||||
/* #define HAVE_LCD_CONTRAST */
|
||||
|
||||
#define MIN_CONTRAST_SETTING 0
|
||||
#define MAX_CONTRAST_SETTING 127
|
||||
#define DEFAULT_CONTRAST_SETTING 63 /* Match boot contrast */
|
||||
|
||||
/* We're able to shut off power to the HDD */
|
||||
#define HAVE_ATA_POWER_OFF
|
||||
|
||||
/* Offset ( in the firmware file's header ) to the file CRC and data. These are
|
||||
only used when loading the old format rockbox.e200 file */
|
||||
#define FIRMWARE_OFFSET_FILE_CRC 0x0
|
||||
#define FIRMWARE_OFFSET_FILE_DATA 0x8
|
||||
|
||||
/* USB On-the-go */
|
||||
#define CONFIG_USBOTG USBOTG_ARC
|
||||
|
||||
/* enable these for the experimental usb stack */
|
||||
#define HAVE_USBSTACK
|
||||
#define USE_ROCKBOX_USB
|
||||
#define USB_VENDOR_ID 0x0471
|
||||
#define USB_PRODUCT_ID 0x014C
|
||||
#define HAVE_USB_HID_MOUSE
|
||||
|
||||
/* Define this if you have adjustable CPU frequency */
|
||||
#define HAVE_ADJUSTABLE_CPU_FREQ
|
||||
|
||||
#define MI4_FORMAT
|
||||
#define BOOTFILE_EXT "mi4"
|
||||
#define BOOTFILE "rockbox." BOOTFILE_EXT
|
||||
#define BOOTDIR "/.rockbox"
|
||||
|
||||
#define ICODE_ATTR_TREMOR_NOT_MDCT
|
||||
|
|
@ -86,6 +86,9 @@ enum {
|
|||
#elif CONFIG_KEYPAD == PHILIPS_HDD1630_PAD
|
||||
#define USBPOWER_BUTTON BUTTON_PLAYLIST
|
||||
#define USBPOWER_BTN_IGNORE BUTTON_POWER
|
||||
#elif CONFIG_KEYPAD == PHILIPS_HDD6330_PAD
|
||||
#define USBPOWER_BUTTON BUTTON_SELECT
|
||||
#define USBPOWER_BTN_IGNORE BUTTON_POWER
|
||||
#elif CONFIG_KEYPAD == SAMSUNG_YH_PAD
|
||||
#define USBPOWER_BUTTON BUTTON_RIGHT
|
||||
#define USBPOWER_BTN_IGNORE BUTTON_LEFT
|
||||
|
|
|
@ -59,7 +59,7 @@ unsigned short adc_scan(int channel)
|
|||
|
||||
adcdata[channel] = (adc_data_1<<2 | adc_data_2);
|
||||
|
||||
#if !defined(PHILIPS_HDD1630)
|
||||
#if !(defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330))
|
||||
/* ADC values read low if PLL is enabled */
|
||||
if(PLL_CONTROL & 0x80000000){
|
||||
adcdata[channel] += 0x14;
|
||||
|
@ -94,7 +94,7 @@ static void adc_tick(void)
|
|||
/* Figured out from how the OF does things */
|
||||
void adc_init(void)
|
||||
{
|
||||
#if defined(PHILIPS_HDD1630)
|
||||
#if defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330)
|
||||
ADC_INIT = 0;
|
||||
#else
|
||||
ADC_INIT |= 1;
|
||||
|
@ -119,7 +119,7 @@ void adc_init(void)
|
|||
ADC_ADDR = 0;
|
||||
ADC_ADDR |= 0x40;
|
||||
|
||||
#if !defined(PHILIPS_HDD1630)
|
||||
#if !(defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330))
|
||||
ADC_ADDR |= 0x20000000;
|
||||
udelay(100);
|
||||
|
||||
|
@ -155,7 +155,7 @@ void adc_init(void)
|
|||
ADC_STATUS |= 0x20000000;
|
||||
#endif
|
||||
|
||||
#if defined(PHILIPS_HDD1630)
|
||||
#if defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330)
|
||||
ADC_INIT |= 0x80000000;
|
||||
udelay(100);
|
||||
ADC_INIT = 0;
|
||||
|
|
|
@ -156,7 +156,7 @@ cpu:
|
|||
mov r1, #WAKE
|
||||
str r1, [r0]
|
||||
|
||||
#if defined(SANSA_C200) || defined(PHILIPS_HDD1630)
|
||||
#if defined(SANSA_C200) || defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330)
|
||||
/* Magic for loading the c200 OF */
|
||||
ldr r0, =0xb00d10ad
|
||||
mov r1, #0x700
|
||||
|
|
|
@ -269,8 +269,8 @@ void i2c_init(void)
|
|||
|
||||
#if CONFIG_I2C == I2C_PP5020
|
||||
outl(0x0, 0x600060a4);
|
||||
#if defined(PHILIPS_HDD1630) || defined(SAMSUNG_YH820) || \
|
||||
defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925)
|
||||
#if defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330) || \
|
||||
defined(SAMSUNG_YH820) || defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925)
|
||||
outl(inl(0x600060a4) | 0x20, 0x600060a4);
|
||||
outl(inl(0x7000c020) | 0x3, 0x7000c020);
|
||||
outl(0x55, 0x7000c02c);
|
||||
|
|
35
firmware/target/arm/philips/hdd6330/adc-target.h
Normal file
35
firmware/target/arm/philips/hdd6330/adc-target.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2006 by Barry Wardell
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
#ifndef _ADC_TARGET_H_
|
||||
#define _ADC_TARGET_H_
|
||||
|
||||
#define NUM_ADC_CHANNELS 2
|
||||
|
||||
#define ADC_BATTERY 0
|
||||
#define ADC_UNKNOWN_1 1
|
||||
#define ADC_UNKNOWN_2 2
|
||||
#define ADC_UNKNOWN_3 3
|
||||
#define ADC_UNREG_POWER ADC_BATTERY /* For compatibility */
|
||||
|
||||
/* Force a scan now */
|
||||
unsigned short adc_scan(int channel);
|
||||
|
||||
#endif
|
125
firmware/target/arm/philips/hdd6330/button-hdd6330.c
Normal file
125
firmware/target/arm/philips/hdd6330/button-hdd6330.c
Normal file
|
@ -0,0 +1,125 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2008 by Mark Arigo
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "system.h"
|
||||
#include "button.h"
|
||||
#include "backlight.h"
|
||||
#include "synaptics-mep.h"
|
||||
|
||||
/*#define LOGF_ENABLE*/
|
||||
#include "logf.h"
|
||||
|
||||
static int int_btn = BUTTON_NONE;
|
||||
|
||||
/*
|
||||
* Generate a click sound from the player (not in headphones yet)
|
||||
* TODO: integrate this with the "key click" option
|
||||
*/
|
||||
void button_click(void)
|
||||
{
|
||||
GPO32_ENABLE |= 0x2000;
|
||||
GPO32_VAL |= 0x2000;
|
||||
udelay(1000);
|
||||
GPO32_VAL &= ~0x2000;
|
||||
}
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
void button_init_device(void)
|
||||
{
|
||||
/* The touchpad is powered on and initialized in power-hdd1630.c
|
||||
since it needs to be ready for both buttons and button lights. */
|
||||
}
|
||||
|
||||
/*
|
||||
* Button interrupt handler
|
||||
*/
|
||||
void button_int(void)
|
||||
{
|
||||
char data[4];
|
||||
int val;
|
||||
|
||||
int_btn = BUTTON_NONE;
|
||||
|
||||
val = touchpad_read_device(data, 4);
|
||||
|
||||
if (val == MEP_BUTTON_HEADER)
|
||||
{
|
||||
/* Buttons packet */
|
||||
if (data[1] & 0x1)
|
||||
int_btn |= BUTTON_LEFT;
|
||||
if (data[1] & 0x2)
|
||||
int_btn |= BUTTON_RIGHT;
|
||||
}
|
||||
else if (val == MEP_ABSOLUTE_HEADER)
|
||||
{
|
||||
/* Absolute packet - the finger is on the vertical strip.
|
||||
Position ranges from 1-4095, with 1 at the bottom. */
|
||||
val = ((data[1] >> 4) << 8) | data[2]; /* position */
|
||||
|
||||
if ((val > 0) && (val <= 1365))
|
||||
int_btn |= BUTTON_DOWN;
|
||||
else if ((val > 1365) && (val <= 2730))
|
||||
int_btn |= BUTTON_SELECT;
|
||||
else if ((val > 2730) && (val <= 4095))
|
||||
int_btn |= BUTTON_UP;
|
||||
}
|
||||
}
|
||||
#else
|
||||
void button_init_device(void){}
|
||||
#endif /* bootloader */
|
||||
|
||||
bool button_hold(void)
|
||||
{
|
||||
return !(GPIOJ_INPUT_VAL & 0x8);
|
||||
}
|
||||
|
||||
/*
|
||||
* Get button pressed from hardware
|
||||
*/
|
||||
int button_read_device(void)
|
||||
{
|
||||
static int btn_old = BUTTON_NONE;
|
||||
int btn = int_btn;
|
||||
|
||||
/* Hold */
|
||||
if(button_hold())
|
||||
return BUTTON_NONE;
|
||||
|
||||
/* Device buttons */
|
||||
if (!(GPIOA_INPUT_VAL & 0x01)) btn |= BUTTON_MENU;
|
||||
if (!(GPIOA_INPUT_VAL & 0x02)) btn |= BUTTON_VOL_UP;
|
||||
if (!(GPIOA_INPUT_VAL & 0x04)) btn |= BUTTON_VOL_DOWN;
|
||||
if (!(GPIOA_INPUT_VAL & 0x08)) btn |= BUTTON_VIEW;
|
||||
if (!(GPIOD_INPUT_VAL & 0x20)) btn |= BUTTON_PLAYLIST;
|
||||
if (!(GPIOD_INPUT_VAL & 0x40)) btn |= BUTTON_POWER;
|
||||
|
||||
if ((btn != btn_old) && (btn != BUTTON_NONE))
|
||||
button_click();
|
||||
|
||||
btn_old = btn;
|
||||
|
||||
return btn;
|
||||
}
|
||||
|
||||
bool headphones_inserted(void)
|
||||
{
|
||||
return (GPIOE_INPUT_VAL & 0x80) ? true : false;
|
||||
}
|
63
firmware/target/arm/philips/hdd6330/button-target.h
Normal file
63
firmware/target/arm/philips/hdd6330/button-target.h
Normal file
|
@ -0,0 +1,63 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2008 by Mark Arigo
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _BUTTON_TARGET_H_
|
||||
#define _BUTTON_TARGET_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include "config.h"
|
||||
|
||||
#define MEP_BUTTON_HEADER 0x19
|
||||
#define MEP_BUTTON_ID 0x9
|
||||
#define MEP_ABSOLUTE_HEADER 0x0b
|
||||
|
||||
#define HAS_BUTTON_HOLD
|
||||
|
||||
bool button_hold(void);
|
||||
void button_init_device(void);
|
||||
int button_read_device(void);
|
||||
|
||||
#ifndef BOOTLOADER
|
||||
void button_int(void);
|
||||
#endif
|
||||
|
||||
/* Main unit's buttons */
|
||||
#define BUTTON_POWER 0x00000001
|
||||
#define BUTTON_PLAYLIST 0x00000002
|
||||
#define BUTTON_MENU 0x00000004
|
||||
#define BUTTON_VIEW 0x00000008
|
||||
#define BUTTON_VOL_UP 0x00000010
|
||||
#define BUTTON_VOL_DOWN 0x00000020
|
||||
#define BUTTON_SELECT 0x00000040
|
||||
#define BUTTON_LEFT 0x00000080
|
||||
#define BUTTON_RIGHT 0x00000100
|
||||
#define BUTTON_UP 0x00000200
|
||||
#define BUTTON_DOWN 0x00000400
|
||||
|
||||
#define BUTTON_MAIN 0x00000fff
|
||||
|
||||
/* No Remote control */
|
||||
#define BUTTON_REMOTE 0
|
||||
|
||||
#define POWEROFF_BUTTON BUTTON_POWER
|
||||
#define POWEROFF_COUNT 10
|
||||
|
||||
#endif /* _BUTTON_TARGET_H_ */
|
159
firmware/target/arm/philips/hdd6330/lcd-hdd6330.c
Normal file
159
firmware/target/arm/philips/hdd6330/lcd-hdd6330.c
Normal file
|
@ -0,0 +1,159 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2009 by Mark Arigo
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* 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 "lcd.h"
|
||||
#include "kernel.h"
|
||||
#include "system.h"
|
||||
|
||||
/* Display status */
|
||||
static unsigned lcd_yuv_options SHAREDBSS_ATTR = 0;
|
||||
|
||||
/* wait for LCD */
|
||||
static inline void lcd_wait_write(void)
|
||||
{
|
||||
int i = 0;
|
||||
while (LCD2_PORT & LCD2_BUSY_MASK)
|
||||
{
|
||||
if (i < 2000)
|
||||
i++;
|
||||
else
|
||||
LCD2_PORT &= ~LCD2_BUSY_MASK;
|
||||
}
|
||||
}
|
||||
|
||||
/* send LCD data */
|
||||
static void lcd_send_data(unsigned data)
|
||||
{
|
||||
lcd_wait_write();
|
||||
LCD2_PORT = LCD2_DATA_MASK | (data & 0xff);
|
||||
}
|
||||
|
||||
/* send LCD command */
|
||||
static void lcd_send_cmd(unsigned cmd)
|
||||
{
|
||||
lcd_wait_write();
|
||||
LCD2_PORT = LCD2_CMD_MASK | (cmd & 0xff);
|
||||
lcd_wait_write();
|
||||
}
|
||||
|
||||
static inline void lcd_send_pixel(unsigned pixel)
|
||||
{
|
||||
lcd_send_data(pixel >> 8);
|
||||
lcd_send_data(pixel);
|
||||
}
|
||||
|
||||
void lcd_init_device(void)
|
||||
{
|
||||
/* init handled by the OF bootloader */
|
||||
}
|
||||
|
||||
/*** hardware configuration ***/
|
||||
int lcd_default_contrast(void)
|
||||
{
|
||||
return DEFAULT_CONTRAST_SETTING;
|
||||
}
|
||||
|
||||
void lcd_set_contrast(int val)
|
||||
{
|
||||
(void)val;
|
||||
}
|
||||
|
||||
void lcd_set_invert_display(bool yesno)
|
||||
{
|
||||
(void)yesno;
|
||||
}
|
||||
|
||||
/* turn the display upside down (call lcd_update() afterwards) */
|
||||
void lcd_set_flip(bool yesno)
|
||||
{
|
||||
(void)yesno;
|
||||
}
|
||||
|
||||
void lcd_yuv_set_options(unsigned options)
|
||||
{
|
||||
lcd_yuv_options = options;
|
||||
}
|
||||
|
||||
/* Performance function to blit a YUV bitmap directly to the LCD */
|
||||
void lcd_blit_yuv(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 the display.
|
||||
This must be called after all other LCD functions that change the display. */
|
||||
void lcd_update(void)
|
||||
{
|
||||
lcd_update_rect(0, 0, LCD_WIDTH, LCD_HEIGHT);
|
||||
}
|
||||
|
||||
/* Update a fraction of the display. */
|
||||
void lcd_update_rect(int x, int y, int width, int height)
|
||||
{
|
||||
const fb_data *addr;
|
||||
|
||||
if (x + width >= LCD_WIDTH)
|
||||
width = LCD_WIDTH - x;
|
||||
if (y + height >= LCD_HEIGHT)
|
||||
height = LCD_HEIGHT - y;
|
||||
|
||||
if ((width <= 0) || (height <= 0))
|
||||
return; /* Nothing left to do. */
|
||||
|
||||
addr = &lcd_framebuffer[y][x];
|
||||
|
||||
lcd_send_cmd(0x01);
|
||||
lcd_send_data(0x48);
|
||||
|
||||
lcd_send_cmd(0x05);
|
||||
lcd_send_data(0x0f);
|
||||
|
||||
lcd_send_cmd(0x08);
|
||||
lcd_send_data(y);
|
||||
|
||||
lcd_send_cmd(0x09);
|
||||
lcd_send_data(y + height - 1);
|
||||
|
||||
lcd_send_cmd(0x0a);
|
||||
lcd_send_data(x + 16);
|
||||
|
||||
lcd_send_cmd(0x0b);
|
||||
lcd_send_data(x + width - 1 + 16);
|
||||
|
||||
lcd_send_cmd(0x06);
|
||||
do {
|
||||
int w = width;
|
||||
do {
|
||||
lcd_send_pixel(*addr++);
|
||||
} while (--w > 0);
|
||||
addr += LCD_WIDTH - width;
|
||||
} while (--height > 0);
|
||||
}
|
72
firmware/target/arm/philips/hdd6330/powermgmt-hdd6330.c
Normal file
72
firmware/target/arm/philips/hdd6330/powermgmt-hdd6330.c
Normal file
|
@ -0,0 +1,72 @@
|
|||
/***************************************************************************
|
||||
* __________ __ ___.
|
||||
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
||||
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
||||
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
||||
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
||||
* \/ \/ \/ \/ \/
|
||||
* $Id$
|
||||
*
|
||||
* Copyright (C) 2002 by Heikki Hannikainen, Uwe Freese
|
||||
* Revisions copyright (C) 2005 by Gerald Van Baren
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
||||
* KIND, either express or implied.
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#include "config.h"
|
||||
#include "adc.h"
|
||||
#include "powermgmt.h"
|
||||
|
||||
#define SMLAL(lo, hi, x, y) \
|
||||
asm volatile ("smlal %0, %1, %2, %3" \
|
||||
: "+r" (lo), "+r" (hi) \
|
||||
: "%r" (x), "r" (y))
|
||||
|
||||
const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
3550
|
||||
};
|
||||
|
||||
const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] =
|
||||
{
|
||||
3500
|
||||
};
|
||||
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */
|
||||
const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] =
|
||||
{
|
||||
{ 3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990 },
|
||||
};
|
||||
|
||||
#if CONFIG_CHARGING
|
||||
/* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */
|
||||
const unsigned short percent_to_volt_charge[11] =
|
||||
{
|
||||
3480, 3550, 3590, 3610, 3630, 3650, 3700, 3760, 3800, 3910, 3990
|
||||
};
|
||||
#endif /* CONFIG_CHARGING */
|
||||
|
||||
#define BATTERY_SCALE_FACTOR 4200
|
||||
/* full-scale ADC readout (2^10) in millivolt */
|
||||
|
||||
/* Returns battery voltage from ADC [millivolts] */
|
||||
unsigned int battery_adc_voltage(void)
|
||||
{
|
||||
/* return (adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR) >> 10; */
|
||||
|
||||
/* This may be overly complicated (pulled from the OF) */
|
||||
int lo = 0;
|
||||
int val = adc_read(ADC_UNREG_POWER) * BATTERY_SCALE_FACTOR;
|
||||
|
||||
SMLAL(lo, val, 0x8a42f871, val);
|
||||
val>>= 9;
|
||||
val -= (val >> 31);
|
||||
return val;
|
||||
}
|
|
@ -143,7 +143,7 @@ void __attribute__((interrupt("IRQ"))) irq_handler(void)
|
|||
usb_insert_int();
|
||||
}
|
||||
/* end PHILIPS_SA9200 */
|
||||
#elif defined(PHILIPS_HDD1630)
|
||||
#elif defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330)
|
||||
else if (CPU_HI_INT_STAT & GPIO0_MASK) {
|
||||
if (GPIOA_INT_STAT & 0x20)
|
||||
button_int();
|
||||
|
@ -152,7 +152,7 @@ void __attribute__((interrupt("IRQ"))) irq_handler(void)
|
|||
if (GPIOE_INT_STAT & 0x04)
|
||||
usb_insert_int();
|
||||
}
|
||||
/* end PHILIPS_HDD1630 */
|
||||
/* end PHILIPS_HDD1630 || PHILIPS_HDD6330 */
|
||||
#elif defined(SAMSUNG_YH820) || defined(SAMSUNG_YH920) || defined(SAMSUNG_YH925)
|
||||
else if (CPU_HI_INT_STAT & GPIO0_MASK) {
|
||||
if (GPIOD_INT_STAT & 0x10)
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
#define USB_GPIO_MASK 0x80
|
||||
#define USB_GPIO_VAL 0x00
|
||||
|
||||
#elif defined(PHILIPS_HDD1630)
|
||||
#elif defined(PHILIPS_HDD1630) || defined(PHILIPS_HDD6330)
|
||||
/* GPIO E bit 2 is usb detect */
|
||||
#define USB_GPIO GPIOE
|
||||
#define USB_GPIO_MASK 0x04
|
||||
|
|
36
tools/configure
vendored
36
tools/configure
vendored
|
@ -894,12 +894,12 @@ cat <<EOF
|
|||
90) Zen Vision:M 30GB 100) GoGear SA9200 55) Sansa Clip
|
||||
91) Zen Vision:M 60GB 101) GoGear HDD1630/ 56) Sansa e200v2
|
||||
92) Zen Vision HDD1830 57) Sansa m200v4
|
||||
58) Sansa Fuze
|
||||
==Onda== ==Meizu== 59) Sansa c200v2
|
||||
120) VX747 110) M6SL 60) Sansa Clipv2
|
||||
121) VX767 111) M6SP 61) Sansa View
|
||||
122) VX747+ 112) M3
|
||||
123) VX777 ==Logik==
|
||||
102) GoGear HDD6330 58) Sansa Fuze
|
||||
==Onda== 59) Sansa c200v2
|
||||
120) VX747 ==Meizu== 60) Sansa Clipv2
|
||||
121) VX767 110) M6SL 61) Sansa View
|
||||
122) VX747+ 111) M6SP
|
||||
123) VX777 112) M3 ==Logik==
|
||||
80) DAX 1GB MP3/DAB
|
||||
==Samsung== ==Tatung==
|
||||
140) YH-820 150) Elio TPJ-1022 ==Lyre project==
|
||||
|
@ -2120,6 +2120,30 @@ fi
|
|||
t_model="hdd1630"
|
||||
;;
|
||||
|
||||
102|gogearhdd6330)
|
||||
target_id=65
|
||||
modelname="gogearhdd6330"
|
||||
target="-DPHILIPS_HDD6330"
|
||||
memory=32 # supposedly
|
||||
arm7tdmicc
|
||||
tool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBOS"
|
||||
bmp2rb_mono="$rootdir/tools/bmp2rb -f 0"
|
||||
bmp2rb_native="$rootdir/tools/bmp2rb -f 4"
|
||||
output="rockbox.mi4"
|
||||
appextra="recorder:gui"
|
||||
plugins=""
|
||||
swcodec="yes"
|
||||
boottool="$rootdir/tools/scramble -mi4v3 -model=6330 -type=RBBL"
|
||||
bootoutput="FWImage.ebn"
|
||||
# toolset is the tools within the tools directory that we build for
|
||||
# this particular target.
|
||||
toolset=$scramblebitmaptools
|
||||
# architecture, manufacturer and model for the target-tree build
|
||||
t_cpu="arm"
|
||||
t_manufacturer="philips"
|
||||
t_model="hdd6330"
|
||||
;;
|
||||
|
||||
110|meizum6sl)
|
||||
target_id=49
|
||||
modelname="meizum6sl"
|
||||
|
|
|
@ -123,9 +123,9 @@ void usage(void)
|
|||
"\t (X values: h100, h120, h140, h300, ipco, nano, ipvd, mn2g\n"
|
||||
"\t ip3g, ip4g, mini, iax5, iam5, iam3, h10, h10_5gb,\n"
|
||||
"\t tpj2, c200, e200, giga, gigs, m100, m500, d2,\n");
|
||||
printf("\t 9200, 1630, ldax, m200, c100, clip, e2v2, m2v4,\n"
|
||||
"\t fuze, c2v2, clv2, y820, y920, y925, x747, 747p, \n"
|
||||
"\t x777, nn2g, m244)\n");
|
||||
printf("\t 9200, 1630, 6330, ldax, m200, c100, clip, e2v2,\n"
|
||||
"\t m2v4, fuze, c2v2, clv2, y820, y920, y925, x747,\n"
|
||||
"\t 747p, x777, nn2g, m244)\n");
|
||||
printf("\nNo option results in Archos standard player/recorder format.\n");
|
||||
|
||||
exit(1);
|
||||
|
@ -318,6 +318,8 @@ int main (int argc, char** argv)
|
|||
modelnum = 62;
|
||||
else if (!strcmp(&argv[1][5], "x767"))
|
||||
modelnum = 64;
|
||||
else if (!strcmp(&argv[1][5], "6330")) /* Philips HDD6330 */
|
||||
modelnum = 65;
|
||||
else if (!strcmp(&argv[1][5], "m244"))
|
||||
modelnum = 131;
|
||||
else {
|
||||
|
|
Loading…
Reference in a new issue