Daniel Stenberg | 1c0c861 | 2002-05-17 12:22:24 +0000 | [diff] [blame] | 1 | /*************************************************************************** |
| 2 | * __________ __ ___. |
| 3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ |
| 4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / |
| 5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < |
| 6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ |
| 7 | * \/ \/ \/ \/ \/ |
| 8 | * $Id$ |
| 9 | * |
| 10 | * Copyright (C) 2002 Robert E. Hak |
| 11 | * |
Daniel Stenberg | 2acc0ac | 2008-06-28 18:10:04 +0000 | [diff] [blame] | 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. |
Daniel Stenberg | 1c0c861 | 2002-05-17 12:22:24 +0000 | [diff] [blame] | 16 | * |
| 17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY |
| 18 | * KIND, either express or implied. |
| 19 | * |
| 20 | ****************************************************************************/ |
Markus Braun | f150d99 | 2002-08-12 07:14:46 +0000 | [diff] [blame] | 21 | #include <string.h> |
Daniel Stenberg | 93b231c | 2002-09-12 13:33:59 +0000 | [diff] [blame] | 22 | #include "lcd.h" |
| 23 | #include "font.h" |
Markus Braun | 9bf86f7 | 2002-08-09 11:57:31 +0000 | [diff] [blame] | 24 | #include "kernel.h" |
Markus Braun | f150d99 | 2002-08-12 07:14:46 +0000 | [diff] [blame] | 25 | #include "rtc.h" |
Uwe Freese | 012d1d5 | 2002-12-18 18:47:11 +0000 | [diff] [blame] | 26 | #include "powermgmt.h" |
Daniel Stenberg | 1c0c861 | 2002-05-17 12:22:24 +0000 | [diff] [blame] | 27 | |
Markus Braun | 22a7a2d | 2002-10-14 12:50:20 +0000 | [diff] [blame] | 28 | #include "settings.h" |
| 29 | |
Björn Stenberg | 51b45d5 | 2008-10-15 06:38:51 +0000 | [diff] [blame] | 30 | #include "metadata.h" |
Daniel Stenberg | 1c0c861 | 2002-05-17 12:22:24 +0000 | [diff] [blame] | 31 | #include "icons.h" |
| 32 | |
Jens Arnold | 638dd67 | 2004-07-19 21:46:37 +0000 | [diff] [blame] | 33 | const unsigned char bitmap_icons_5x8[][5] = |
Markus Braun | de8fbf0 | 2002-08-07 10:35:26 +0000 | [diff] [blame] | 34 | { |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 35 | [Icon_Lock_Main] = |
| 36 | {0x78, 0x7f, 0x49, 0x7f, 0x78}, /* Lock Main */ |
| 37 | [Icon_Lock_Remote] = |
| 38 | {0x78, 0x7f, 0x49, 0x7f, 0x78}, /* Lock Remote */ |
| 39 | [Icon_Stereo] = |
| 40 | {0x7f, 0x22, 0x1c, 0x22, 0x7f}, /* Stereo recording */ |
| 41 | [Icon_Mono] = |
| 42 | {0x00, 0x1c, 0x22, 0x7f, 0x00}, /* Mono recording */ |
Martin Scarratt | 183499a | 2006-09-26 11:56:59 +0000 | [diff] [blame] | 43 | #if CONFIG_CODEC != SWCODEC |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 44 | [Icon_q] = |
| 45 | {0x1e, 0x21, 0x31, 0x21, 0x5e} /* Q icon */ |
Martin Scarratt | 183499a | 2006-09-26 11:56:59 +0000 | [diff] [blame] | 46 | #endif |
Markus Braun | de8fbf0 | 2002-08-07 10:35:26 +0000 | [diff] [blame] | 47 | }; |
| 48 | |
Jens Arnold | 638dd67 | 2004-07-19 21:46:37 +0000 | [diff] [blame] | 49 | const unsigned char bitmap_icons_7x8[][7] = |
Markus Braun | de8fbf0 | 2002-08-07 10:35:26 +0000 | [diff] [blame] | 50 | { |
Björn Stenberg | b763822 | 2002-10-08 10:10:16 +0000 | [diff] [blame] | 51 | {0x08,0x1c,0x3e,0x3e,0x3e,0x14,0x14}, /* Power plug */ |
Jens Arnold | 97a8049 | 2005-06-23 02:18:29 +0000 | [diff] [blame] | 52 | {0x1c,0x14,0x3e,0x2a,0x22,0x1c,0x08}, /* USB plug */ |
Björn Stenberg | b763822 | 2002-10-08 10:10:16 +0000 | [diff] [blame] | 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 */ |
Anton Oleynikov | 2c83634 | 2005-11-19 20:45:32 +0000 | [diff] [blame] | 61 | {0x40,0xa0,0xa0,0xa0,0x7f,0x02,0x02}, /* Radio on */ |
| 62 | {0x42,0xa4,0xa8,0xb0,0x7f,0x22,0x42}, /* Radio mute */ |
Linus Nielsen Feltzing | 0afe4ff | 2002-10-29 13:59:51 +0000 | [diff] [blame] | 63 | {0x44,0x4e,0x5f,0x44,0x44,0x44,0x38}, /* Repeat playmode */ |
| 64 | {0x44,0x4e,0x5f,0x44,0x38,0x02,0x7f}, /* Repeat-one playmode */ |
Björn Stenberg | b763822 | 2002-10-08 10:10:16 +0000 | [diff] [blame] | 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 */ |
Anton Oleynikov | 2c83634 | 2005-11-19 20:45:32 +0000 | [diff] [blame] | 68 | {0x7f,0x04,0x4e,0x5f,0x44,0x38,0x7f} /* Repeat-AB playmode */ |
Markus Braun | de8fbf0 | 2002-08-07 10:35:26 +0000 | [diff] [blame] | 69 | }; |
| 70 | |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 71 | #if CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) |
| 72 | const unsigned char bitmap_glyphs_4x8[][4] = |
Martin Scarratt | 617b67e | 2006-09-02 17:30:30 +0000 | [diff] [blame] | 73 | { |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 74 | /* Keep digits together and first! */ |
| 75 | [0] = |
| 76 | {0x00, 0x3e, 0x22, 0x3e}, /* 0 */ |
| 77 | [1] = |
| 78 | {0x00, 0x24, 0x3e, 0x20}, /* 1 */ |
| 79 | [2] = |
| 80 | {0x00, 0x3a, 0x2a, 0x2e}, /* 2 */ |
| 81 | [3] = |
| 82 | {0x00, 0x22, 0x2a, 0x36}, /* 3 */ |
| 83 | [4] = |
| 84 | {0x00, 0x0e, 0x08, 0x3e}, /* 4 */ |
| 85 | [5] = |
| 86 | {0x00, 0x2e, 0x2a, 0x3a}, /* 5 */ |
| 87 | [6] = |
| 88 | {0x00, 0x3e, 0x2a, 0x3a}, /* 6 */ |
| 89 | [7] = |
| 90 | {0x00, 0x02, 0x02, 0x3e}, /* 7 */ |
| 91 | [8] = |
| 92 | {0x00, 0x3e, 0x2a, 0x3e}, /* 8 */ |
| 93 | [9] = |
| 94 | {0x00, 0x0e, 0x0a, 0x3e}, /* 9 */ |
| 95 | [10 ... Glyph_4x8Last-1] = |
| 96 | {0x00, 0x00, 0x00, 0x00}, /* auto-blank */ |
| 97 | [Glyph_4x8_k] = |
| 98 | {0x00, 0x3e, 0x10, 0x28}, /* k */ |
Martin Scarratt | 617b67e | 2006-09-02 17:30:30 +0000 | [diff] [blame] | 99 | }; |
Martin Scarratt | d7fa569 | 2006-09-12 18:26:27 +0000 | [diff] [blame] | 100 | |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 101 | const unsigned char bitmap_formats_18x8[Format_18x8Last][18]= |
Martin Scarratt | d7fa569 | 2006-09-12 18:26:27 +0000 | [diff] [blame] | 102 | { |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 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}, /* ___ */ |
Michael Sevakis | 0729b92 | 2006-11-24 19:49:04 +0000 | [diff] [blame] | 106 | [Format_18x8_AIFF] = |
| 107 | {0x00, 0x3c, 0x0a, 0x0a, 0x0a, 0x3c, 0x00, 0x3e, 0x00, |
| 108 | 0x3e, 0x0a, 0x02, 0x02, 0x00, 0x3e, 0x0a, 0x02, 0x02}, /* AIFF */ |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 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 */ |
Martin Scarratt | d7fa569 | 2006-09-12 18:26:27 +0000 | [diff] [blame] | 118 | }; |
Michael Sevakis | 0f5cb94 | 2006-11-06 18:07:30 +0000 | [diff] [blame] | 119 | #endif /* CONFIG_CODEC == SWCODEC && defined(HAVE_RECORDING) */ |
Martin Scarratt | d7fa569 | 2006-09-12 18:26:27 +0000 | [diff] [blame] | 120 | |
Jörg Hohensohn | f5e7a76 | 2005-03-01 22:55:52 +0000 | [diff] [blame] | 121 | /* Disk/MMC activity */ |
Jens Arnold | 548755a | 2005-11-24 00:10:14 +0000 | [diff] [blame] | 122 | const unsigned char bitmap_icon_disk[12] = |
Jens Arnold | 3867cf9 | 2008-06-27 21:40:06 +0000 | [diff] [blame] | 123 | #ifdef HAVE_FLASH_STORAGE |
Jörg Hohensohn | f5e7a76 | 2005-03-01 22:55:52 +0000 | [diff] [blame] | 124 | {0x15,0x3f,0x7d,0x7B,0x77,0x67,0x79,0x7b,0x57,0x4f,0x47,0x7f}; |
Jens Arnold | 548755a | 2005-11-24 00:10:14 +0000 | [diff] [blame] | 125 | #else |
Jens Arnold | ce05add | 2007-04-15 22:16:28 +0000 | [diff] [blame] | 126 | {0x00,0x00,0x00,0x1c,0x2e,0x4f,0x77,0x79,0x3a,0x1c,0x00,0x00}; |
Jens Arnold | 548755a | 2005-11-24 00:10:14 +0000 | [diff] [blame] | 127 | #endif |
Jörg Hohensohn | f5e7a76 | 2005-03-01 22:55:52 +0000 | [diff] [blame] | 128 | |