forked from len0rd/rockbox
M:Robe 500: Commit some minor changes and some keymap changes (short press power takes you out of the WPS)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20942 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
3eb6da3c1d
commit
d8c7285b2a
6 changed files with 33 additions and 97 deletions
|
@ -36,31 +36,22 @@
|
||||||
* Insert LAST_ITEM_IN_LIST at the end of each mapping
|
* Insert LAST_ITEM_IN_LIST at the end of each mapping
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#define BUTTON_UP BUTTON_RC_PLAY
|
|
||||||
#define BUTTON_DOWN BUTTON_RC_DOWN
|
|
||||||
|
|
||||||
#define BUTTON_SELECT BUTTON_RC_HEART
|
|
||||||
#define BUTTON_MENU BUTTON_RC_MODE
|
|
||||||
#define BUTTON_VOL_DOWN BUTTON_RC_VOL_DOWN
|
|
||||||
#define BUTTON_VOL_UP BUTTON_RC_VOL_UP
|
|
||||||
|
|
||||||
static const struct button_mapping button_context_standard[] = {
|
static const struct button_mapping button_context_standard[] = {
|
||||||
{ ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE },
|
{ ACTION_STD_PREV, BUTTON_RC_PLAY, BUTTON_NONE },
|
||||||
{ ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_PREVREPEAT, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE },
|
{ ACTION_STD_NEXT, BUTTON_RC_DOWN, BUTTON_NONE },
|
||||||
{ ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_NEXTREPEAT, BUTTON_RC_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT },
|
{ ACTION_STD_OK, BUTTON_RC_HEART|BUTTON_REL, BUTTON_RC_HEART },
|
||||||
{ ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE },
|
{ ACTION_STD_OK, BUTTON_RC_FF, BUTTON_NONE },
|
||||||
{ ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT },
|
{ ACTION_STD_OK, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_RC_FF },
|
||||||
|
|
||||||
{ ACTION_STD_MENU, BUTTON_MENU, BUTTON_NONE },
|
{ ACTION_STD_MENU, BUTTON_RC_MODE, BUTTON_NONE },
|
||||||
{ ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT },
|
{ ACTION_STD_CONTEXT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_RC_HEART },
|
||||||
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
|
||||||
{ ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_RC_REW, BUTTON_NONE },
|
||||||
{ ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_STD_CANCEL, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_standard */
|
}; /* button_context_standard */
|
||||||
|
|
||||||
|
@ -73,19 +64,24 @@ static const struct button_mapping button_context_wps[] = {
|
||||||
|
|
||||||
{ ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE },
|
{ ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE },
|
||||||
{ ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
{ ACTION_WPS_STOPSEEK,BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT},
|
|
||||||
{ ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT},
|
|
||||||
|
|
||||||
{ ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
{ ACTION_WPS_STOPSEEK, BUTTON_RC_REW|BUTTON_REL,
|
||||||
{ ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
|
BUTTON_RC_REW|BUTTON_REPEAT},
|
||||||
{ ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
|
||||||
{ ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
|
{ ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL,
|
||||||
|
BUTTON_RC_FF|BUTTON_REPEAT},
|
||||||
|
|
||||||
|
{ ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
|
||||||
|
{ ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
|
||||||
|
{ ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
|
||||||
|
|
||||||
{ ACTION_WPS_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE },
|
{ ACTION_WPS_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE },
|
||||||
{ ACTION_WPS_MENU, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE },
|
{ ACTION_WPS_MENU, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE },
|
||||||
|
{ ACTION_WPS_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
|
||||||
{ ACTION_WPS_CONTEXT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_RC_HEART },
|
{ ACTION_WPS_CONTEXT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_RC_HEART },
|
||||||
|
|
||||||
{ ACTION_WPS_BROWSE, BUTTON_RC_HEART|BUTTON_REL, BUTTON_RC_HEART },
|
{ ACTION_WPS_BROWSE, BUTTON_RC_HEART|BUTTON_REL, BUTTON_RC_HEART },
|
||||||
|
|
||||||
LAST_ITEM_IN_LIST
|
LAST_ITEM_IN_LIST
|
||||||
}; /* button_context_wps */
|
}; /* button_context_wps */
|
||||||
|
@ -244,3 +240,4 @@ const struct button_mapping* target_get_context_mapping(int context)
|
||||||
}
|
}
|
||||||
return button_context_standard;
|
return button_context_standard;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,6 @@ PLUGIN_HEADER
|
||||||
(CONFIG_KEYPAD == MROBE100_PAD) || \
|
(CONFIG_KEYPAD == MROBE100_PAD) || \
|
||||||
(CONFIG_KEYPAD == COWOND2_PAD) || \
|
(CONFIG_KEYPAD == COWOND2_PAD) || \
|
||||||
(CONFIG_KEYPAD == IAUDIO67_PAD) || \
|
(CONFIG_KEYPAD == IAUDIO67_PAD) || \
|
||||||
(CONFIG_KEYPAD == CREATIVEZVM_PAD) || \
|
|
||||||
(CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \
|
(CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \
|
||||||
(CONFIG_KEYPAD == ONDAVX747_PAD) || \
|
(CONFIG_KEYPAD == ONDAVX747_PAD) || \
|
||||||
(CONFIG_KEYPAD == GIGABEAT_PAD) || \
|
(CONFIG_KEYPAD == GIGABEAT_PAD) || \
|
||||||
|
@ -66,7 +65,8 @@ PLUGIN_HEADER
|
||||||
#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
|
#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
|
||||||
#define SNOW_QUIT (BUTTON_HOME|BUTTON_REPEAT)
|
#define SNOW_QUIT (BUTTON_HOME|BUTTON_REPEAT)
|
||||||
|
|
||||||
#elif CONFIG_KEYPAD == GIGABEAT_S_PAD
|
#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) || \
|
||||||
|
(CONFIG_KEYPAD == CREATIVEZVM_PAD)
|
||||||
#define SNOW_QUIT BUTTON_BACK
|
#define SNOW_QUIT BUTTON_BACK
|
||||||
|
|
||||||
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
|
#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
|
||||||
|
|
|
@ -68,67 +68,3 @@ void ata_device_init(void)
|
||||||
IO_GIO_DIR0&=~(1<<10);
|
IO_GIO_DIR0&=~(1<<10);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
void copy_read_sectors(unsigned char* buf, int wordcount)
|
|
||||||
{
|
|
||||||
__buttonlight_trigger();
|
|
||||||
|
|
||||||
/* Unaligned transfer - slow copy */
|
|
||||||
if ( (unsigned long)buf & 1)
|
|
||||||
{ /* not 16-bit aligned, copy byte by byte */
|
|
||||||
unsigned short tmp = 0;
|
|
||||||
unsigned char* bufend = buf + wordcount*2;
|
|
||||||
do
|
|
||||||
{
|
|
||||||
tmp = ATA_DATA;
|
|
||||||
*buf++ = tmp & 0xff; /* I assume big endian */
|
|
||||||
*buf++ = tmp >> 8; /* and don't use the SWAB16 macro */
|
|
||||||
} while (buf < bufend); /* tail loop is faster */
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/* This should never happen, but worth watching for */
|
|
||||||
if(wordcount > (1 << 18))
|
|
||||||
panicf("atd-meg-fx.c: copy_read_sectors: too many sectors per read!");
|
|
||||||
|
|
||||||
//#define GIGABEAT_DEBUG_ATA
|
|
||||||
#ifdef GIGABEAT_DEBUG_ATA
|
|
||||||
static int line = 0;
|
|
||||||
static char str[256];
|
|
||||||
snprintf(str, sizeof(str), "ODD DMA to %08x, %d", buf, wordcount);
|
|
||||||
lcd_puts(10, line, str);
|
|
||||||
line = (line+1) % 32;
|
|
||||||
lcd_update();
|
|
||||||
#endif
|
|
||||||
/* Reset the channel */
|
|
||||||
DMASKTRIG0 |= 4;
|
|
||||||
/* Wait for DMA controller to be ready */
|
|
||||||
while(DMASKTRIG0 & 0x2)
|
|
||||||
;
|
|
||||||
while(DSTAT0 & (1 << 20))
|
|
||||||
;
|
|
||||||
/* Source is ATA_DATA, on AHB Bus, Fixed */
|
|
||||||
DISRC0 = (int) 0x18000000;
|
|
||||||
DISRCC0 = 0x1;
|
|
||||||
/* Dest mapped to physical address, on AHB bus, increment */
|
|
||||||
DIDST0 = (int) buf;
|
|
||||||
if(DIDST0 < 0x30000000)
|
|
||||||
DIDST0 += 0x30000000;
|
|
||||||
DIDSTC0 = 0;
|
|
||||||
|
|
||||||
/* DACK/DREQ Sync to AHB, Whole service, No reload, 16-bit transfers */
|
|
||||||
DCON0 = ((1 << 30) | (1<<27) | (1<<22) | (1<<20)) | wordcount;
|
|
||||||
|
|
||||||
/* Activate the channel */
|
|
||||||
DMASKTRIG0 = 0x2;
|
|
||||||
|
|
||||||
invalidate_dcache_range((void *)buf, wordcount*2);
|
|
||||||
|
|
||||||
/* Start DMA */
|
|
||||||
DMASKTRIG0 |= 0x1;
|
|
||||||
|
|
||||||
/* Wait for transfer to complete */
|
|
||||||
while((DSTAT0 & 0x000fffff))
|
|
||||||
priority_yield();
|
|
||||||
/* Dump cache for the buffer */
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -130,9 +130,11 @@ int button_read_device(int *data)
|
||||||
button_read |= BUTTON_POWER;
|
button_read |= BUTTON_POWER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(HAVE_REMOTE_LCD)
|
||||||
/* Read data from the remote */
|
/* Read data from the remote */
|
||||||
button_read |= remote_read_device();
|
button_read |= remote_read_device();
|
||||||
hold_button=remote_button_hold();
|
hold_button=remote_button_hold();
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Take care of hold notifications */
|
/* Take care of hold notifications */
|
||||||
#ifndef BOOTLOADER
|
#ifndef BOOTLOADER
|
||||||
|
|
|
@ -73,7 +73,9 @@ void power_off(void)
|
||||||
{
|
{
|
||||||
/* turn off backlight and wait for 1 second */
|
/* turn off backlight and wait for 1 second */
|
||||||
_backlight_off();
|
_backlight_off();
|
||||||
|
#if defined(HAVE_REMOTE_LCD)
|
||||||
lcd_remote_sleep();
|
lcd_remote_sleep();
|
||||||
|
#endif
|
||||||
lcd_sleep();
|
lcd_sleep();
|
||||||
sleep(HZ);
|
sleep(HZ);
|
||||||
/* Hard shutdown */
|
/* Hard shutdown */
|
||||||
|
|
|
@ -247,7 +247,6 @@ void system_init(void)
|
||||||
IO_INTC_ENTRY_TBA0 = 0;
|
IO_INTC_ENTRY_TBA0 = 0;
|
||||||
IO_INTC_ENTRY_TBA1 = 0;
|
IO_INTC_ENTRY_TBA1 = 0;
|
||||||
|
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
/* Set interrupt priorities to predefined values */
|
/* Set interrupt priorities to predefined values */
|
||||||
for(i = 0; i < 23; i++)
|
for(i = 0; i < 23; i++)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue