1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2002 Robert E. Hak
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
26 #include "powermgmt.h"
33 const unsigned char bitmap_icons_5x8
[][5] =
36 {0x78, 0x7f, 0x49, 0x7f, 0x78}, /* Lock Main */
38 {0x78, 0x7f, 0x49, 0x7f, 0x78}, /* Lock Remote */
40 {0x7f, 0x22, 0x1c, 0x22, 0x7f}, /* Stereo recording */
42 {0x00, 0x1c, 0x22, 0x7f, 0x00}, /* Mono recording */
43 #if CONFIG_CODEC != SWCODEC
45 {0x1e, 0x21, 0x31, 0x21, 0x5e} /* Q icon */
49 const unsigned char bitmap_icons_7x8
[][7] =
51 {0x08,0x1c,0x3e,0x3e,0x3e,0x14,0x14}, /* Power plug */
52 {0x1c,0x14,0x3e,0x2a,0x22,0x1c,0x08}, /* USB plug */
53 {0x01,0x1e,0x1c,0x3e,0x7f,0x20,0x40}, /* Speaker mute */
54 {0x00,0x7f,0x7f,0x3e,0x1c,0x08,0x00}, /* Play */
55 {0x7f,0x7f,0x7f,0x7f,0x7f,0x7f,0x7f}, /* Stop */
56 {0x00,0x7f,0x7f,0x00,0x7f,0x7f,0x00}, /* Pause */
57 {0x7f,0x3e,0x1c,0x7f,0x3e,0x1c,0x08}, /* Fast forward */
58 {0x08,0x1c,0x3e,0x7f,0x1c,0x3e,0x7f}, /* Fast backward */
59 {0x1c,0x3e,0x7f,0x7f,0x7f,0x3e,0x1c}, /* Record */
60 {0x1c,0x3e,0x7f,0x00,0x7f,0x3e,0x1c}, /* Record pause */
61 {0x40,0xa0,0xa0,0xa0,0x7f,0x02,0x02}, /* Radio on */
62 {0x42,0xa4,0xa8,0xb0,0x7f,0x22,0x42}, /* Radio mute */
63 {0x44,0x4e,0x5f,0x44,0x44,0x44,0x38}, /* Repeat playmode */
64 {0x44,0x4e,0x5f,0x44,0x38,0x02,0x7f}, /* Repeat-one playmode */
65 {0x3e,0x41,0x51,0x41,0x45,0x41,0x3e}, /* Shuffle playmode (dice) */
66 {0x04,0x0c,0x1c,0x3c,0x1c,0x0c,0x04}, /* Down-arrow */
67 {0x20,0x30,0x38,0x3c,0x38,0x30,0x20}, /* Up-arrow */
68 {0x7f,0x04,0x4e,0x5f,0x44,0x38,0x7f} /* Repeat-AB playmode */
71 #if CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING)
72 const unsigned char bitmap_glyphs_4x8
[][4] =
74 /* Keep digits together and first! */
76 {0x00, 0x3e, 0x22, 0x3e}, /* 0 */
78 {0x00, 0x24, 0x3e, 0x20}, /* 1 */
80 {0x00, 0x3a, 0x2a, 0x2e}, /* 2 */
82 {0x00, 0x22, 0x2a, 0x36}, /* 3 */
84 {0x00, 0x0e, 0x08, 0x3e}, /* 4 */
86 {0x00, 0x2e, 0x2a, 0x3a}, /* 5 */
88 {0x00, 0x3e, 0x2a, 0x3a}, /* 6 */
90 {0x00, 0x02, 0x02, 0x3e}, /* 7 */
92 {0x00, 0x3e, 0x2a, 0x3e}, /* 8 */
94 {0x00, 0x0e, 0x0a, 0x3e}, /* 9 */
95 [10 ... Glyph_4x8Last
-1] =
96 {0x00, 0x00, 0x00, 0x00}, /* auto-blank */
98 {0x00, 0x3e, 0x10, 0x28}, /* k */
101 const unsigned char bitmap_formats_18x8
[Format_18x8Last
][18]=
103 [0 ... Format_18x8Last
-1] = /* auto-blank */
104 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
105 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* ___ */
107 {0x00, 0x3c, 0x0a, 0x0a, 0x0a, 0x3c, 0x00, 0x3e, 0x00,
108 0x3e, 0x0a, 0x02, 0x02, 0x00, 0x3e, 0x0a, 0x02, 0x02}, /* AIFF */
109 [Format_18x8_MPA_L3
] =
110 {0x00, 0x3e, 0x04, 0x08, 0x04, 0x3e, 0x00, 0x00, 0x00,
111 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, /* M__ */
112 [Format_18x8_WAVPACK
] =
113 {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x20,
114 0x18, 0x20, 0x1e, 0x00, 0x0e, 0x10, 0x20, 0x10, 0x0e}, /* _WV */
115 [Format_18x8_PCM_WAV
] =
116 {0x00, 0x1e, 0x20, 0x18, 0x20, 0x1e, 0x00, 0x3c, 0x0a,
117 0x0a, 0x0a, 0x3c, 0x00, 0x0e, 0x10, 0x20, 0x10, 0x0e}, /* WAV */
119 #endif /* CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) */
121 /* Disk/MMC activity */
122 const unsigned char bitmap_icon_disk
[12] =
123 #ifdef HAVE_FLASH_STORAGE
124 {0x15,0x3f,0x7d,0x7B,0x77,0x67,0x79,0x7b,0x57,0x4f,0x47,0x7f};
126 {0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00};
130 * Print play mode to status bar
132 void statusbar_icon_play_mode(int mode
)
134 lcd_mono_bitmap(bitmap_icons_7x8
[mode
], ICON_PLAY_MODE_X_POS
,
135 STATUSBAR_Y_POS
, ICON_PLAY_MODE_WIDTH
, STATUSBAR_HEIGHT
);
139 * Print shuffle mode to status bar
141 void statusbar_icon_shuffle(void)
143 lcd_mono_bitmap(bitmap_icons_7x8
[Icon_Shuffle
], ICON_SHUFFLE_X_POS
,
144 STATUSBAR_Y_POS
, ICON_SHUFFLE_WIDTH
, STATUSBAR_HEIGHT
);