summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/keymaps/keymap-mr500.c61
-rw-r--r--apps/plugins/snow.c4
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c64
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c2
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c2
-rw-r--r--firmware/target/arm/tms320dm320/system-dm320.c3
6 files changed, 36 insertions, 100 deletions
diff --git a/apps/keymaps/keymap-mr500.c b/apps/keymaps/keymap-mr500.c
index 73d20d8ae9..aa04461b64 100644
--- a/apps/keymaps/keymap-mr500.c
+++ b/apps/keymaps/keymap-mr500.c
@@ -36,31 +36,22 @@
36 * Insert LAST_ITEM_IN_LIST at the end of each mapping 36 * Insert LAST_ITEM_IN_LIST at the end of each mapping
37 */ 37 */
38 38
39
40#define BUTTON_UP BUTTON_RC_PLAY
41#define BUTTON_DOWN BUTTON_RC_DOWN
42
43#define BUTTON_SELECT BUTTON_RC_HEART
44#define BUTTON_MENU BUTTON_RC_MODE
45#define BUTTON_VOL_DOWN BUTTON_RC_VOL_DOWN
46#define BUTTON_VOL_UP BUTTON_RC_VOL_UP
47
48static const struct button_mapping button_context_standard[] = { 39static const struct button_mapping button_context_standard[] = {
49 { ACTION_STD_PREV, BUTTON_UP, BUTTON_NONE }, 40 { ACTION_STD_PREV, BUTTON_RC_PLAY, BUTTON_NONE },
50 { ACTION_STD_PREVREPEAT, BUTTON_UP|BUTTON_REPEAT, BUTTON_NONE }, 41 { ACTION_STD_PREVREPEAT, BUTTON_RC_PLAY|BUTTON_REPEAT, BUTTON_NONE },
51 { ACTION_STD_NEXT, BUTTON_DOWN, BUTTON_NONE }, 42 { ACTION_STD_NEXT, BUTTON_RC_DOWN, BUTTON_NONE },
52 { ACTION_STD_NEXTREPEAT, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 43 { ACTION_STD_NEXTREPEAT, BUTTON_RC_DOWN|BUTTON_REPEAT, BUTTON_NONE },
53 44
54 { ACTION_STD_OK, BUTTON_SELECT|BUTTON_REL, BUTTON_SELECT }, 45 { ACTION_STD_OK, BUTTON_RC_HEART|BUTTON_REL, BUTTON_RC_HEART },
55 { ACTION_STD_OK, BUTTON_RIGHT, BUTTON_NONE }, 46 { ACTION_STD_OK, BUTTON_RC_FF, BUTTON_NONE },
56 { ACTION_STD_OK, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT }, 47 { ACTION_STD_OK, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_RC_FF },
57 48
58 { ACTION_STD_MENU, BUTTON_MENU, BUTTON_NONE }, 49 { ACTION_STD_MENU, BUTTON_RC_MODE, BUTTON_NONE },
59 { ACTION_STD_QUICKSCREEN, BUTTON_MENU|BUTTON_REPEAT, BUTTON_NONE }, 50 { ACTION_STD_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_NONE },
60 { ACTION_STD_CONTEXT, BUTTON_SELECT|BUTTON_REPEAT, BUTTON_SELECT }, 51 { ACTION_STD_CONTEXT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_RC_HEART },
61 { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE }, 52 { ACTION_STD_CANCEL, BUTTON_POWER, BUTTON_NONE },
62 { ACTION_STD_CANCEL, BUTTON_LEFT, BUTTON_NONE }, 53 { ACTION_STD_CANCEL, BUTTON_RC_REW, BUTTON_NONE },
63 { ACTION_STD_CANCEL, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE }, 54 { ACTION_STD_CANCEL, BUTTON_RC_REW|BUTTON_REPEAT, BUTTON_NONE },
64 LAST_ITEM_IN_LIST 55 LAST_ITEM_IN_LIST
65}; /* button_context_standard */ 56}; /* button_context_standard */
66 57
@@ -73,19 +64,24 @@ static const struct button_mapping button_context_wps[] = {
73 64
74 { ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE }, 65 { ACTION_WPS_SEEKBACK, BUTTON_RC_REW|BUTTON_REPEAT,BUTTON_NONE },
75 { ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE }, 66 { ACTION_WPS_SEEKFWD, BUTTON_RC_FF|BUTTON_REPEAT, BUTTON_NONE },
76 { ACTION_WPS_STOPSEEK,BUTTON_RC_REW|BUTTON_REL, BUTTON_RC_REW|BUTTON_REPEAT}, 67
77 { ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL, BUTTON_RC_FF|BUTTON_REPEAT}, 68 { ACTION_WPS_STOPSEEK, BUTTON_RC_REW|BUTTON_REL,
78 69 BUTTON_RC_REW|BUTTON_REPEAT},
79 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE }, 70
80 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE }, 71 { ACTION_WPS_STOPSEEK, BUTTON_RC_FF|BUTTON_REL,
81 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE }, 72 BUTTON_RC_FF|BUTTON_REPEAT},
82 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE }, 73
74 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN|BUTTON_REPEAT, BUTTON_NONE },
75 { ACTION_WPS_VOLDOWN, BUTTON_RC_VOL_DOWN, BUTTON_NONE },
76 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP|BUTTON_REPEAT, BUTTON_NONE },
77 { ACTION_WPS_VOLUP, BUTTON_RC_VOL_UP, BUTTON_NONE },
83 78
84 { ACTION_WPS_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE }, 79 { ACTION_WPS_QUICKSCREEN, BUTTON_RC_MODE|BUTTON_REPEAT, BUTTON_RC_MODE },
85 { ACTION_WPS_MENU, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE }, 80 { ACTION_WPS_MENU, BUTTON_RC_MODE|BUTTON_REL, BUTTON_RC_MODE },
81 { ACTION_WPS_MENU, BUTTON_POWER|BUTTON_REL, BUTTON_POWER },
86 { ACTION_WPS_CONTEXT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_RC_HEART }, 82 { ACTION_WPS_CONTEXT, BUTTON_RC_HEART|BUTTON_REPEAT, BUTTON_RC_HEART },
87 83
88 { ACTION_WPS_BROWSE, BUTTON_RC_HEART|BUTTON_REL, BUTTON_RC_HEART }, 84 { ACTION_WPS_BROWSE, BUTTON_RC_HEART|BUTTON_REL, BUTTON_RC_HEART },
89 85
90 LAST_ITEM_IN_LIST 86 LAST_ITEM_IN_LIST
91}; /* button_context_wps */ 87}; /* button_context_wps */
@@ -244,3 +240,4 @@ const struct button_mapping* target_get_context_mapping(int context)
244 } 240 }
245 return button_context_standard; 241 return button_context_standard;
246} 242}
243
diff --git a/apps/plugins/snow.c b/apps/plugins/snow.c
index 2a2b0a139c..fe10e3995b 100644
--- a/apps/plugins/snow.c
+++ b/apps/plugins/snow.c
@@ -56,7 +56,6 @@ PLUGIN_HEADER
56(CONFIG_KEYPAD == MROBE100_PAD) || \ 56(CONFIG_KEYPAD == MROBE100_PAD) || \
57(CONFIG_KEYPAD == COWOND2_PAD) || \ 57(CONFIG_KEYPAD == COWOND2_PAD) || \
58(CONFIG_KEYPAD == IAUDIO67_PAD) || \ 58(CONFIG_KEYPAD == IAUDIO67_PAD) || \
59(CONFIG_KEYPAD == CREATIVEZVM_PAD) || \
60(CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \ 59(CONFIG_KEYPAD == PHILIPS_HDD1630_PAD) || \
61(CONFIG_KEYPAD == ONDAVX747_PAD) || \ 60(CONFIG_KEYPAD == ONDAVX747_PAD) || \
62(CONFIG_KEYPAD == GIGABEAT_PAD) || \ 61(CONFIG_KEYPAD == GIGABEAT_PAD) || \
@@ -66,7 +65,8 @@ PLUGIN_HEADER
66#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD) 65#elif (CONFIG_KEYPAD == SANSA_FUZE_PAD)
67#define SNOW_QUIT (BUTTON_HOME|BUTTON_REPEAT) 66#define SNOW_QUIT (BUTTON_HOME|BUTTON_REPEAT)
68 67
69#elif CONFIG_KEYPAD == GIGABEAT_S_PAD 68#elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) || \
69(CONFIG_KEYPAD == CREATIVEZVM_PAD)
70#define SNOW_QUIT BUTTON_BACK 70#define SNOW_QUIT BUTTON_BACK
71 71
72#elif CONFIG_KEYPAD == IAUDIO_M3_PAD 72#elif CONFIG_KEYPAD == IAUDIO_M3_PAD
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c
index 2377309a1d..51837dd653 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/ata-mr500.c
@@ -68,67 +68,3 @@ void ata_device_init(void)
68 IO_GIO_DIR0&=~(1<<10); 68 IO_GIO_DIR0&=~(1<<10);
69} 69}
70 70
71#if 0
72void copy_read_sectors(unsigned char* buf, int wordcount)
73{
74 __buttonlight_trigger();
75
76 /* Unaligned transfer - slow copy */
77 if ( (unsigned long)buf & 1)
78 { /* not 16-bit aligned, copy byte by byte */
79 unsigned short tmp = 0;
80 unsigned char* bufend = buf + wordcount*2;
81 do
82 {
83 tmp = ATA_DATA;
84 *buf++ = tmp & 0xff; /* I assume big endian */
85 *buf++ = tmp >> 8; /* and don't use the SWAB16 macro */
86 } while (buf < bufend); /* tail loop is faster */
87 return;
88 }
89 /* This should never happen, but worth watching for */
90 if(wordcount > (1 << 18))
91 panicf("atd-meg-fx.c: copy_read_sectors: too many sectors per read!");
92
93//#define GIGABEAT_DEBUG_ATA
94#ifdef GIGABEAT_DEBUG_ATA
95 static int line = 0;
96 static char str[256];
97 snprintf(str, sizeof(str), "ODD DMA to %08x, %d", buf, wordcount);
98 lcd_puts(10, line, str);
99 line = (line+1) % 32;
100 lcd_update();
101#endif
102 /* Reset the channel */
103 DMASKTRIG0 |= 4;
104 /* Wait for DMA controller to be ready */
105 while(DMASKTRIG0 & 0x2)
106 ;
107 while(DSTAT0 & (1 << 20))
108 ;
109 /* Source is ATA_DATA, on AHB Bus, Fixed */
110 DISRC0 = (int) 0x18000000;
111 DISRCC0 = 0x1;
112 /* Dest mapped to physical address, on AHB bus, increment */
113 DIDST0 = (int) buf;
114 if(DIDST0 < 0x30000000)
115 DIDST0 += 0x30000000;
116 DIDSTC0 = 0;
117
118 /* DACK/DREQ Sync to AHB, Whole service, No reload, 16-bit transfers */
119 DCON0 = ((1 << 30) | (1<<27) | (1<<22) | (1<<20)) | wordcount;
120
121 /* Activate the channel */
122 DMASKTRIG0 = 0x2;
123
124 invalidate_dcache_range((void *)buf, wordcount*2);
125
126 /* Start DMA */
127 DMASKTRIG0 |= 0x1;
128
129 /* Wait for transfer to complete */
130 while((DSTAT0 & 0x000fffff))
131 priority_yield();
132 /* Dump cache for the buffer */
133}
134#endif
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
index 3e7077bd6d..4def88c4f8 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/button-mr500.c
@@ -130,9 +130,11 @@ int button_read_device(int *data)
130 button_read |= BUTTON_POWER; 130 button_read |= BUTTON_POWER;
131 } 131 }
132 132
133#if defined(HAVE_REMOTE_LCD)
133 /* Read data from the remote */ 134 /* Read data from the remote */
134 button_read |= remote_read_device(); 135 button_read |= remote_read_device();
135 hold_button=remote_button_hold(); 136 hold_button=remote_button_hold();
137#endif
136 138
137 /* Take care of hold notifications */ 139 /* Take care of hold notifications */
138#ifndef BOOTLOADER 140#ifndef BOOTLOADER
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c
index 1b90ccca78..c0d497ccdc 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/power-mr500.c
@@ -73,7 +73,9 @@ void power_off(void)
73{ 73{
74 /* turn off backlight and wait for 1 second */ 74 /* turn off backlight and wait for 1 second */
75 _backlight_off(); 75 _backlight_off();
76#if defined(HAVE_REMOTE_LCD)
76 lcd_remote_sleep(); 77 lcd_remote_sleep();
78#endif
77 lcd_sleep(); 79 lcd_sleep();
78 sleep(HZ); 80 sleep(HZ);
79 /* Hard shutdown */ 81 /* Hard shutdown */
diff --git a/firmware/target/arm/tms320dm320/system-dm320.c b/firmware/target/arm/tms320dm320/system-dm320.c
index 0142f7b18b..b8c9eee87f 100644
--- a/firmware/target/arm/tms320dm320/system-dm320.c
+++ b/firmware/target/arm/tms320dm320/system-dm320.c
@@ -246,8 +246,7 @@ void system_init(void)
246 246
247 IO_INTC_ENTRY_TBA0 = 0; 247 IO_INTC_ENTRY_TBA0 = 0;
248 IO_INTC_ENTRY_TBA1 = 0; 248 IO_INTC_ENTRY_TBA1 = 0;
249 249
250
251 int i; 250 int i;
252 /* Set interrupt priorities to predefined values */ 251 /* Set interrupt priorities to predefined values */
253 for(i = 0; i < 23; i++) 252 for(i = 0; i < 23; i++)