summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd.c
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-07-22 22:37:03 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-07-22 22:37:03 +0000
commitcc22cd0736e465f47f4017bd6f4a4729c767456a (patch)
tree1546f58d5547b2d5c123b25fe1f4e1c8c5f8bec9 /firmware/drivers/lcd.c
parentb81adc40c067eb3d2187a98f5e670f0506e3198e (diff)
downloadrockbox-cc22cd0736e465f47f4017bd6f4a4729c767456a.tar.gz
rockbox-cc22cd0736e465f47f4017bd6f4a4729c767456a.zip
Added icon functions for the Player model
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1404 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/lcd.c')
-rw-r--r--firmware/drivers/lcd.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c
index ef1c3fc262..89f00d220a 100644
--- a/firmware/drivers/lcd.c
+++ b/firmware/drivers/lcd.c
@@ -375,6 +375,61 @@ void lcd_double_height(bool on)
375 lcd_write(true,on?9:8); 375 lcd_write(true,on?9:8);
376} 376}
377 377
378unsigned char icon_mirror[11];
379static char icon_pos[] =
380{
381 0, 0, 0, 0, /* Battery */
382 2, /* USB */
383 3, /* Play */
384 4, /* Record */
385 5, /* Pause */
386 5, /* Audio */
387 6, /* Repeat */
388 7, /* 1 */
389 9, /* Volume */
390 9, /* Volume 1 */
391 9, /* Volume 2 */
392 10, /* Volume 3 */
393 10, /* Volume 4 */
394 10, /* Volume 5 */
395 10, /* Param */
396};
397
398static char icon_mask[] =
399{
400 0x02, 0x08, 0x04, 0x10, /* Battery */
401 0x04, /* USB */
402 0x10, /* Play */
403 0x10, /* Record */
404 0x02, /* Pause */
405 0x10, /* Audio */
406 0x02, /* Repeat */
407 0x01, /* 1 */
408 0x04, /* Volume */
409 0x02, /* Volume 1 */
410 0x01, /* Volume 2 */
411 0x08, /* Volume 3 */
412 0x04, /* Volume 4 */
413 0x01, /* Volume 5 */
414 0x10, /* Param */
415};
416
417void lcd_icon(int icon, bool enable)
418{
419 int pos, mask;
420
421 pos = icon_pos[icon];
422 mask = icon_mask[icon];
423
424 lcd_write(true, LCD_ICON(pos));
425
426 if(enable)
427 icon_mirror[pos] |= mask;
428 else
429 icon_mirror[pos] &= ~mask;
430
431 lcd_write(false, icon_mirror[pos]);
432}
378#endif /* !SIMULATOR */ 433#endif /* !SIMULATOR */
379 434
380#endif /* HAVE_LCD_CHARCELLS */ 435#endif /* HAVE_LCD_CHARCELLS */
@@ -384,6 +439,8 @@ void lcd_init (void)
384{ 439{
385 create_thread(scroll_thread, scroll_stack, 440 create_thread(scroll_thread, scroll_stack,
386 sizeof(scroll_stack), scroll_name); 441 sizeof(scroll_stack), scroll_name);
442
443 memset(icon_mirror, sizeof(icon_mirror), 0);
387} 444}
388#endif 445#endif
389 446