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)
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)
lcd_write(true,on?9:8);
}
+unsigned char icon_mirror[11];
+static char icon_pos[] =
+{
+ 0, 0, 0, 0, /* Battery */
+ 2, /* USB */
+ 3, /* Play */
+ 4, /* Record */
+ 5, /* Pause */
+ 5, /* Audio */
+ 6, /* Repeat */
+ 7, /* 1 */
+ 9, /* Volume */
+ 9, /* Volume 1 */
+ 9, /* Volume 2 */
+ 10, /* Volume 3 */
+ 10, /* Volume 4 */
+ 10, /* Volume 5 */
+ 10, /* Param */
+};
+
+static char icon_mask[] =
+{
+ 0x02, 0x08, 0x04, 0x10, /* Battery */
+ 0x04, /* USB */
+ 0x10, /* Play */
+ 0x10, /* Record */
+ 0x02, /* Pause */
+ 0x10, /* Audio */
+ 0x02, /* Repeat */
+ 0x01, /* 1 */
+ 0x04, /* Volume */
+ 0x02, /* Volume 1 */
+ 0x01, /* Volume 2 */
+ 0x08, /* Volume 3 */
+ 0x04, /* Volume 4 */
+ 0x01, /* Volume 5 */
+ 0x10, /* Param */
+};
+
+void lcd_icon(int icon, bool enable)
+{
+ int pos, mask;
+
+ pos = icon_pos[icon];
+ mask = icon_mask[icon];
+
+ lcd_write(true, LCD_ICON(pos));
+
+ if(enable)
+ icon_mirror[pos] |= mask;
+ else
+ icon_mirror[pos] &= ~mask;
+
+ lcd_write(false, icon_mirror[pos]);
+}
#endif /* !SIMULATOR */
#endif /* HAVE_LCD_CHARCELLS */
@@ -384,6 +439,8 @@ void lcd_init (void)
{
create_thread(scroll_thread, scroll_stack,
sizeof(scroll_stack), scroll_name);
+
+ memset(icon_mirror, sizeof(icon_mirror), 0);
}
#endif