summaryrefslogtreecommitdiff
path: root/bootloader
diff options
context:
space:
mode:
Diffstat (limited to 'bootloader')
-rw-r--r--bootloader/common.c85
1 files changed, 1 insertions, 84 deletions
diff --git a/bootloader/common.c b/bootloader/common.c
index 295ebdc51b..a79b1c4d64 100644
--- a/bootloader/common.c
+++ b/bootloader/common.c
@@ -45,7 +45,7 @@
45#endif 45#endif
46 46
47/* TODO: Other bootloaders need to be adjusted to set this variable to true 47/* TODO: Other bootloaders need to be adjusted to set this variable to true
48 on a button press - currently only the ipod, H10, Vibe 500 and Sansa versions do. */ 48 on a button press - currently only the ipod, H10, Vibe 500, Sansa, and xDuoo x3 versions do. */
49#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) \ 49#if defined(IPOD_ARCH) || defined(IRIVER_H10) || defined(IRIVER_H10_5GB) \
50 || defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F) \ 50 || defined(SANSA_E200) || defined(SANSA_C200) || defined(GIGABEAT_F) \
51 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) || defined(COWON_D2) \ 51 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) || defined(COWON_D2) \
@@ -156,86 +156,3 @@ int load_raw_firmware(unsigned char* buf, char* firmware, int buffer_size)
156 close(fd); 156 close(fd);
157 return len; 157 return len;
158} 158}
159
160/* FIXME?: unused broken code */
161#if 0
162#ifdef ROCKBOX_HAS_LOGF /* Logf display helper for the bootloader */
163
164#define LINES (LCD_HEIGHT/SYSFONT_HEIGHT)
165#define COLUMNS ((LCD_WIDTH/SYSFONT_WIDTH) > MAX_LOGF_ENTRY ? \
166 MAX_LOGF_ENTRY : (LCD_WIDTH/SYSFONT_WIDTH))
167
168#ifdef ONDA_VX747
169#define LOGF_UP BUTTON_VOL_UP
170#define LOGF_DOWN BUTTON_VOL_DOWN
171#define LOGF_CLEAR BUTTON_MENU
172#else
173#warning No keymap defined for this target
174#endif
175
176void display_logf(void) /* Doesn't return! */
177{
178 int i, index, button, user_index=0;
179#ifdef HAVE_TOUCHSCREEN
180 int touch, prev_y=0;
181#endif
182 char buffer[COLUMNS+1];
183
184 while(1)
185 {
186 index = logfindex + user_index;
187
188 lcd_clear_display();
189 for(i = LINES-1; i>=0; i--)
190 {
191 if(--index < 0)
192 {
193 if(logfwrap)
194 index = MAX_LOGF_LINES-1;
195 else
196 break; /* done */
197 }
198
199 memcpy(buffer, logfbuffer[index], COLUMNS);
200
201 if (logfbuffer[index][MAX_LOGF_ENTRY] == LOGF_TERMINATE_CONTINUE_LINE)
202 buffer[MAX_LOGF_ENTRY-1] = '>';
203 else if (logfbuffer[index][MAX_LOGF_ENTRY] == LOGF_TERMINATE_MULTI_LINE)
204 buffer[MAX_LOGF_ENTRY-1] = '\0';
205
206 buffer[COLUMNS] = '\0';
207
208 lcd_puts(0, i, buffer);
209 }
210
211 button = button_get(false);
212 if(button == SYS_USB_CONNECTED)
213 usb_acknowledge(SYS_USB_CONNECTED_ACK);
214 else if(button == SYS_USB_DISCONNECTED)
215 ;
216 else if(button & LOGF_UP)
217 user_index++;
218 else if(button & LOGF_DOWN)
219 user_index--;
220 else if(button & LOGF_CLEAR)
221 user_index = 0;
222#ifdef HAVE_TOUCHSCREEN
223 else if(button & BUTTON_TOUCHSCREEN)
224 {
225 touch = button_get_data();
226
227 if(button & BUTTON_REL)
228 prev_y = 0;
229
230 if(prev_y != 0)
231 user_index += (prev_y - (touch & 0xFFFF)) / SYSFONT_HEIGHT;
232 prev_y = touch & 0xFFFF;
233 }
234#endif
235
236 lcd_update();
237 sleep(HZ/16);
238 }
239}
240#endif
241#endif