summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-03-05 00:04:00 +0000
committerJens Arnold <amiconn@rockbox.org>2007-03-05 00:04:00 +0000
commit8876018d25c6a56cce118482c1372bbff344cb23 (patch)
treea66dca10bf92674c655b9862fd366ecc77bba76a
parentee07215d506def8d3483f4adf6e1d4ae51c10c52 (diff)
downloadrockbox-8876018d25c6a56cce118482c1372bbff344cb23.tar.gz
rockbox-8876018d25c6a56cce118482c1372bbff344cb23.zip
Bring up the M5 port to a working stage: Extended numerous explicit checks for IAUDIO_X5 to also check for IAUDIO_M5, moved code around the target tree, added preliminary background for the sim.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12610 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/debug_menu.c4
-rw-r--r--apps/playback.c2
-rw-r--r--apps/plugins/plugin.lds2
-rw-r--r--firmware/SOURCES37
-rw-r--r--firmware/export/config-iaudiom5.h12
-rw-r--r--firmware/target/coldfire/i2c-coldfire.c2
-rw-r--r--firmware/target/coldfire/iaudio/adc-iaudio.c (renamed from firmware/target/coldfire/iaudio/x5/adc-x5.c)0
-rw-r--r--firmware/target/coldfire/iaudio/adc-target.h (renamed from firmware/target/coldfire/iaudio/x5/adc-target.h)0
-rw-r--r--firmware/target/coldfire/iaudio/ata-iaudio.c (renamed from firmware/target/coldfire/iaudio/x5/ata-x5.c)0
-rw-r--r--firmware/target/coldfire/iaudio/button-target.h (renamed from firmware/target/coldfire/iaudio/x5/button-target.h)0
-rw-r--r--firmware/target/coldfire/iaudio/lcd-remote-iaudio.c (renamed from firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c)0
-rw-r--r--firmware/target/coldfire/iaudio/lcd-remote-target.h (renamed from firmware/target/coldfire/iaudio/x5/lcd-remote-target.h)0
-rw-r--r--firmware/target/coldfire/iaudio/m5/audio-m5.c82
-rw-r--r--firmware/target/coldfire/iaudio/m5/backlight-m5.c58
-rw-r--r--firmware/target/coldfire/iaudio/m5/backlight-target.h29
-rw-r--r--firmware/target/coldfire/iaudio/m5/button-m5.c151
-rw-r--r--firmware/target/coldfire/iaudio/m5/lcd-as-m5.S83
-rw-r--r--firmware/target/coldfire/iaudio/m5/lcd-m5.c219
-rw-r--r--firmware/target/coldfire/iaudio/m5/power-m5.c89
-rw-r--r--firmware/target/coldfire/iaudio/pcf50606-iaudio.c (renamed from firmware/target/coldfire/iaudio/x5/pcf50606-x5.c)0
-rw-r--r--firmware/target/coldfire/iaudio/system-iaudio.c (renamed from firmware/target/coldfire/iaudio/x5/system-x5.c)0
-rw-r--r--firmware/target/coldfire/iaudio/usb-iaudio.c (renamed from firmware/target/coldfire/iaudio/x5/usb-x5.c)0
-rw-r--r--firmware/target/coldfire/iaudio/usb-target.h24
-rw-r--r--firmware/target/coldfire/pcm-coldfire.c2
-rw-r--r--firmware/target/coldfire/system-coldfire.c2
-rw-r--r--uisimulator/sdl/UI-m5.bmpbin0 -> 415856 bytes
-rw-r--r--uisimulator/sdl/uisdl.h18
27 files changed, 781 insertions, 35 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index d6c5ef4d1c..531ac106f4 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -1077,7 +1077,7 @@ bool dbg_ports(void)
1077 snprintf(buf, sizeof(buf), "ADC_BUTTONS: %02x", adc_buttons); 1077 snprintf(buf, sizeof(buf), "ADC_BUTTONS: %02x", adc_buttons);
1078#endif 1078#endif
1079 lcd_puts(0, line++, buf); 1079 lcd_puts(0, line++, buf);
1080#ifdef IAUDIO_X5 1080#if defined(IAUDIO_X5) || defined(IAUDIO_M5)
1081 snprintf(buf, sizeof(buf), "ADC_REMOTE (%c): %02x", 1081 snprintf(buf, sizeof(buf), "ADC_REMOTE (%c): %02x",
1082 remote_detect() ? '+' : '-', adc_remote); 1082 remote_detect() ? '+' : '-', adc_remote);
1083#else 1083#else
@@ -1953,7 +1953,7 @@ static bool dbg_save_roms(void)
1953 fd = creat("/internal_rom_000000-1FFFFF.bin"); 1953 fd = creat("/internal_rom_000000-1FFFFF.bin");
1954#elif defined(IRIVER_H300_SERIES) 1954#elif defined(IRIVER_H300_SERIES)
1955 fd = creat("/internal_rom_000000-3FFFFF.bin"); 1955 fd = creat("/internal_rom_000000-3FFFFF.bin");
1956#elif defined(IAUDIO_X5) 1956#elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
1957 fd = creat("/internal_rom_000000-3FFFFF.bin"); 1957 fd = creat("/internal_rom_000000-3FFFFF.bin");
1958#endif 1958#endif
1959 if(fd >= 0) 1959 if(fd >= 0)
diff --git a/apps/playback.c b/apps/playback.c
index 89caec92aa..2873c90772 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -169,7 +169,7 @@ enum {
169#if defined(CPU_PP) 169#if defined(CPU_PP)
170#define CODEC_IRAM_ORIGIN 0x4000c000 170#define CODEC_IRAM_ORIGIN 0x4000c000
171#define CODEC_IRAM_SIZE 0xc000 171#define CODEC_IRAM_SIZE 0xc000
172#elif defined(IAUDIO_X5) 172#elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
173#define CODEC_IRAM_ORIGIN 0x10010000 173#define CODEC_IRAM_ORIGIN 0x10010000
174#define CODEC_IRAM_SIZE 0x10000 174#define CODEC_IRAM_SIZE 0x10000
175#else 175#else
diff --git a/apps/plugins/plugin.lds b/apps/plugins/plugin.lds
index 5181e5604d..f38f60656a 100644
--- a/apps/plugins/plugin.lds
+++ b/apps/plugins/plugin.lds
@@ -24,7 +24,7 @@ OUTPUT_FORMAT(elf32-sh)
24#define DRAMORIG 0x31000000 24#define DRAMORIG 0x31000000
25#define IRAMORIG 0x1000c000 25#define IRAMORIG 0x1000c000
26#define IRAMSIZE 0xc000 26#define IRAMSIZE 0xc000
27#elif defined(IAUDIO_X5) 27#elif defined(IAUDIO_X5) || defined(IAUDIO_M5)
28#define DRAMORIG 0x31000000 28#define DRAMORIG 0x31000000
29#define IRAMORIG 0x10010000 29#define IRAMORIG 0x10010000
30#define IRAMSIZE 0x10000 30#define IRAMSIZE 0x10000
diff --git a/firmware/SOURCES b/firmware/SOURCES
index ec47fff3d1..ad7d372acc 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -354,17 +354,17 @@ target/coldfire/iaudio/x5/power-x5.c
354#ifndef SIMULATOR 354#ifndef SIMULATOR
355target/coldfire/ata-as-coldfire.S 355target/coldfire/ata-as-coldfire.S
356target/coldfire/pcf50606-coldfire.c 356target/coldfire/pcf50606-coldfire.c
357target/coldfire/iaudio/x5/adc-x5.c 357target/coldfire/iaudio/adc-iaudio.c
358target/coldfire/iaudio/x5/ata-x5.c 358target/coldfire/iaudio/ata-iaudio.c
359target/coldfire/iaudio/lcd-remote-iaudio.c
360target/coldfire/iaudio/pcf50606-iaudio.c
361target/coldfire/iaudio/system-iaudio.c
362target/coldfire/iaudio/usb-iaudio.c
359target/coldfire/iaudio/x5/backlight-x5.c 363target/coldfire/iaudio/x5/backlight-x5.c
360target/coldfire/iaudio/x5/button-x5.c 364target/coldfire/iaudio/x5/button-x5.c
361target/coldfire/iaudio/x5/lcd-as-x5.S 365target/coldfire/iaudio/x5/lcd-as-x5.S
362target/coldfire/iaudio/x5/lcd-remote-x5.c
363target/coldfire/iaudio/x5/lcd-x5.c 366target/coldfire/iaudio/x5/lcd-x5.c
364target/coldfire/iaudio/x5/m5636-x5.c 367target/coldfire/iaudio/x5/m5636-x5.c
365target/coldfire/iaudio/x5/pcf50606-x5.c
366target/coldfire/iaudio/x5/system-x5.c
367target/coldfire/iaudio/x5/usb-x5.c
368#ifndef BOOTLOADER 368#ifndef BOOTLOADER
369target/coldfire/iaudio/x5/audio-x5.c 369target/coldfire/iaudio/x5/audio-x5.c
370#endif 370#endif
@@ -372,23 +372,22 @@ target/coldfire/iaudio/x5/audio-x5.c
372#endif /* IAUDIO_X5 */ 372#endif /* IAUDIO_X5 */
373 373
374#ifdef IAUDIO_M5 374#ifdef IAUDIO_M5
375target/coldfire/iaudio/x5/power-x5.c 375target/coldfire/iaudio/m5/power-m5.c
376#ifndef SIMULATOR 376#ifndef SIMULATOR
377target/coldfire/ata-as-coldfire.S 377target/coldfire/ata-as-coldfire.S
378target/coldfire/pcf50606-coldfire.c 378target/coldfire/pcf50606-coldfire.c
379target/coldfire/iaudio/x5/adc-x5.c 379target/coldfire/iaudio/adc-iaudio.c
380target/coldfire/iaudio/x5/ata-x5.c 380target/coldfire/iaudio/ata-iaudio.c
381target/coldfire/iaudio/x5/backlight-x5.c 381target/coldfire/iaudio/lcd-remote-iaudio.c
382target/coldfire/iaudio/x5/button-x5.c 382target/coldfire/iaudio/m5/backlight-m5.c
383target/coldfire/iaudio/x5/lcd-as-x5.S 383target/coldfire/iaudio/m5/button-m5.c
384target/coldfire/iaudio/x5/lcd-remote-x5.c 384target/coldfire/iaudio/m5/lcd-as-m5.S
385target/coldfire/iaudio/x5/lcd-x5.c 385target/coldfire/iaudio/m5/lcd-m5.c
386target/coldfire/iaudio/x5/m5636-x5.c 386target/coldfire/iaudio/pcf50606-iaudio.c
387target/coldfire/iaudio/x5/pcf50606-x5.c 387target/coldfire/iaudio/system-iaudio.c
388target/coldfire/iaudio/x5/system-x5.c 388target/coldfire/iaudio/usb-iaudio.c
389target/coldfire/iaudio/x5/usb-x5.c
390#ifndef BOOTLOADER 389#ifndef BOOTLOADER
391target/coldfire/iaudio/x5/audio-x5.c 390target/coldfire/iaudio/m5/audio-m5.c
392#endif 391#endif
393#endif /* SIMULATOR */ 392#endif /* SIMULATOR */
394#endif /* IAUDIO_M5 */ 393#endif /* IAUDIO_M5 */
diff --git a/firmware/export/config-iaudiom5.h b/firmware/export/config-iaudiom5.h
index 2c52bc0730..66c54bfdd9 100644
--- a/firmware/export/config-iaudiom5.h
+++ b/firmware/export/config-iaudiom5.h
@@ -144,15 +144,9 @@
144/** Port-specific settings **/ 144/** Port-specific settings **/
145 145
146/* Main LCD contrast range and defaults */ 146/* Main LCD contrast range and defaults */
147#define MIN_CONTRAST_SETTING 1 147#define MIN_CONTRAST_SETTING 24
148#define MAX_CONTRAST_SETTING 30 148#define MAX_CONTRAST_SETTING 63
149#define DEFAULT_CONTRAST_SETTING 19 /* Match boot contrast */ 149#define DEFAULT_CONTRAST_SETTING 40
150
151/* Main LCD backlight brightness range and defaults */
152/* PCF50506 can output 0%-100% duty cycle but D305A expects %15-100%. */
153#define MIN_BRIGHTNESS_SETTING 1 /* 15/16 (93.75%) */
154#define MAX_BRIGHTNESS_SETTING 13 /* 3/16 (18.75%) */
155#define DEFAULT_BRIGHTNESS_SETTING 8 /* 8/16 (50.00%) = x5 boot default */
156 150
157/* Remote LCD contrast range and defaults */ 151/* Remote LCD contrast range and defaults */
158#define MIN_REMOTE_CONTRAST_SETTING 10 152#define MIN_REMOTE_CONTRAST_SETTING 10
diff --git a/firmware/target/coldfire/i2c-coldfire.c b/firmware/target/coldfire/i2c-coldfire.c
index a628ce5f0e..b4e7968d1a 100644
--- a/firmware/target/coldfire/i2c-coldfire.c
+++ b/firmware/target/coldfire/i2c-coldfire.c
@@ -58,7 +58,7 @@ void i2c_init(void)
58 MFDR = 0x0d; 58 MFDR = 0x0d;
59 MFDR2 = 0x0d; 59 MFDR2 = 0x0d;
60 60
61#ifdef IAUDIO_X5 61#if defined(IAUDIO_X5) || defined(IAUDIO_M5)
62 MBCR = IEN; /* Enable interface */ 62 MBCR = IEN; /* Enable interface */
63 MBCR2 = IEN; 63 MBCR2 = IEN;
64#endif 64#endif
diff --git a/firmware/target/coldfire/iaudio/x5/adc-x5.c b/firmware/target/coldfire/iaudio/adc-iaudio.c
index 1895cacfe9..1895cacfe9 100644
--- a/firmware/target/coldfire/iaudio/x5/adc-x5.c
+++ b/firmware/target/coldfire/iaudio/adc-iaudio.c
diff --git a/firmware/target/coldfire/iaudio/x5/adc-target.h b/firmware/target/coldfire/iaudio/adc-target.h
index 28ba6225d1..28ba6225d1 100644
--- a/firmware/target/coldfire/iaudio/x5/adc-target.h
+++ b/firmware/target/coldfire/iaudio/adc-target.h
diff --git a/firmware/target/coldfire/iaudio/x5/ata-x5.c b/firmware/target/coldfire/iaudio/ata-iaudio.c
index 21c088288a..21c088288a 100644
--- a/firmware/target/coldfire/iaudio/x5/ata-x5.c
+++ b/firmware/target/coldfire/iaudio/ata-iaudio.c
diff --git a/firmware/target/coldfire/iaudio/x5/button-target.h b/firmware/target/coldfire/iaudio/button-target.h
index af1088dfed..af1088dfed 100644
--- a/firmware/target/coldfire/iaudio/x5/button-target.h
+++ b/firmware/target/coldfire/iaudio/button-target.h
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c
index 139ebbc2a3..139ebbc2a3 100644
--- a/firmware/target/coldfire/iaudio/x5/lcd-remote-x5.c
+++ b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-remote-target.h b/firmware/target/coldfire/iaudio/lcd-remote-target.h
index 86c361097b..86c361097b 100644
--- a/firmware/target/coldfire/iaudio/x5/lcd-remote-target.h
+++ b/firmware/target/coldfire/iaudio/lcd-remote-target.h
diff --git a/firmware/target/coldfire/iaudio/m5/audio-m5.c b/firmware/target/coldfire/iaudio/m5/audio-m5.c
new file mode 100644
index 0000000000..fcedbcad78
--- /dev/null
+++ b/firmware/target/coldfire/iaudio/m5/audio-m5.c
@@ -0,0 +1,82 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Michael Sevakis
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "system.h"
20#include "cpu.h"
21#include "audio.h"
22#include "sound.h"
23
24void audio_set_output_source(int source)
25{
26 unsigned long txsrc;
27
28 if ((unsigned)source >= AUDIO_NUM_SOURCES)
29 txsrc = (3 << 8); /* playback, PDOR3 */
30 else
31 txsrc = (4 << 8); /* recording, iis1RcvData */
32
33 IIS1CONFIG = (IIS1CONFIG & ~(7 << 8)) | txsrc;
34} /* audio_set_output_source */
35
36void audio_set_source(int source, unsigned flags)
37{
38 /* Prevent pops from unneeded switching */
39 static int last_source = AUDIO_SRC_PLAYBACK;
40
41 (void)flags;
42
43 switch (source)
44 {
45 default: /* playback - no recording */
46 source = AUDIO_SRC_PLAYBACK;
47 case AUDIO_SRC_PLAYBACK:
48 if (source != last_source)
49 {
50 audiohw_disable_recording();
51 audiohw_set_monitor(false);
52 /* Reset PDIR2 data flow */
53 DATAINCONTROL = (1 << 9);
54 }
55 break;
56
57 case AUDIO_SRC_MIC: /* recording only */
58 if (source != last_source)
59 {
60 audiohw_enable_recording(true); /* source mic */
61 /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */
62 DATAINCONTROL = (3 << 14) | (4 << 3);
63 }
64 break;
65
66 case AUDIO_SRC_LINEIN: /* recording only */
67 if (source != last_source)
68 {
69 audiohw_enable_recording(false); /* source line */
70 /* Int. when 6 samples in FIFO, PDIR2 src = iis1RcvData */
71 DATAINCONTROL = (3 << 14) | (4 << 3);
72 }
73 break;
74 } /* end switch */
75
76 or_l((1 << 29), &GPIO_OUT); /* Line In */
77 or_l((1 << 29), &GPIO_ENABLE);
78 or_l((1 << 29), &GPIO_FUNCTION);
79
80 last_source = source;
81} /* audio_set_source */
82
diff --git a/firmware/target/coldfire/iaudio/m5/backlight-m5.c b/firmware/target/coldfire/iaudio/m5/backlight-m5.c
new file mode 100644
index 0000000000..63bc5bc30e
--- /dev/null
+++ b/firmware/target/coldfire/iaudio/m5/backlight-m5.c
@@ -0,0 +1,58 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "config.h"
20#include "cpu.h"
21#include "system.h"
22#include "backlight.h"
23#include "backlight-target.h"
24#include "pcf50606.h"
25#include "lcd.h"
26
27bool __backlight_init(void)
28{
29 __backlight_on();
30
31 return true; /* Backlight always ON after boot. */
32}
33
34void __backlight_on(void)
35{
36 int level = set_irq_level(HIGHEST_IRQ_LEVEL);
37
38 pcf50606_write(0x39, 0x07);
39 set_irq_level(level);
40}
41
42void __backlight_off(void)
43{
44 int level = set_irq_level(HIGHEST_IRQ_LEVEL);
45
46 pcf50606_write(0x39, 0x00);
47 set_irq_level(level);
48}
49
50void __remote_backlight_on(void)
51{
52 and_l(~0x00200000, &GPIO_OUT);
53}
54
55void __remote_backlight_off(void)
56{
57 or_l(0x00200000, &GPIO_OUT);
58}
diff --git a/firmware/target/coldfire/iaudio/m5/backlight-target.h b/firmware/target/coldfire/iaudio/m5/backlight-target.h
new file mode 100644
index 0000000000..d9c116803e
--- /dev/null
+++ b/firmware/target/coldfire/iaudio/m5/backlight-target.h
@@ -0,0 +1,29 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef BACKLIGHT_TARGET_H
20#define BACKLIGHT_TARGET_H
21
22#define __BACKLIGHT_INIT
23bool __backlight_init(void);
24void __backlight_on(void);
25void __backlight_off(void);
26void __remote_backlight_on(void);
27void __remote_backlight_off(void);
28
29#endif
diff --git a/firmware/target/coldfire/iaudio/m5/button-m5.c b/firmware/target/coldfire/iaudio/m5/button-m5.c
new file mode 100644
index 0000000000..a5fdd79fde
--- /dev/null
+++ b/firmware/target/coldfire/iaudio/m5/button-m5.c
@@ -0,0 +1,151 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "config.h"
20#include "system.h"
21#include "button.h"
22#include "backlight.h"
23#include "adc.h"
24#include "lcd-remote-target.h"
25
26/* have buttons scan by default */
27static bool button_scan_on = true;
28static bool hold_button = false;
29static bool remote_hold_button = false;
30
31void button_init_device(void)
32{
33 /* Power, Remote Play & Hold switch */
34 GPIO_FUNCTION |= 0x0e000000;
35 GPIO_ENABLE &= ~0x0e000000;
36}
37
38void button_enable_scan(bool enable)
39{
40 button_scan_on = enable;
41}
42
43bool button_scan_enabled(void)
44{
45 return button_scan_on;
46}
47
48bool button_hold(void)
49{
50 return (GPIO_READ & 0x08000000) == 0;
51}
52
53bool remote_button_hold(void)
54{
55 return remote_hold_button;
56}
57
58int button_read_device(void)
59{
60 int btn = BUTTON_NONE;
61 bool hold_button_old;
62 bool remote_hold_button_old;
63 int data;
64
65 /* normal buttons */
66 hold_button_old = hold_button;
67 hold_button = button_hold();
68
69#ifndef BOOTLOADER
70 /* give BL notice if HB state chaged */
71 if (hold_button != hold_button_old)
72 backlight_hold_changed(hold_button);
73#endif
74
75 if (button_scan_on && !hold_button)
76 {
77 data = adc_scan(ADC_BUTTONS);
78
79 if (data < 0xf0)
80 {
81 if(data < 0x7c)
82 if(data < 0x42)
83 btn = BUTTON_LEFT;
84 else
85 if(data < 0x62)
86 btn = BUTTON_RIGHT;
87 else
88 btn = BUTTON_SELECT;
89 else
90 if(data < 0xb6)
91 if(data < 0x98)
92 btn = BUTTON_PLAY;
93 else
94 btn = BUTTON_REC;
95 else
96 if(data < 0xd3)
97 btn = BUTTON_DOWN;
98 else
99 btn = BUTTON_UP;
100 }
101 }
102
103 /* remote buttons */
104 data = remote_detect() ? adc_scan(ADC_REMOTE) : 0xff;
105
106 remote_hold_button_old = remote_hold_button;
107 remote_hold_button = data < 0x17;
108
109#ifndef BOOTLOADER
110 if (remote_hold_button != remote_hold_button_old)
111 remote_backlight_hold_changed(remote_hold_button);
112#endif
113
114 if (!remote_hold_button)
115 {
116 if (data < 0xee)
117 {
118 if(data < 0x7a)
119 if(data < 0x41)
120 btn |= BUTTON_RC_FF;
121 else
122 if(data < 0x61)
123 btn |= BUTTON_RC_REW;
124 else
125 btn |= BUTTON_RC_MODE;
126 else
127 if(data < 0xb4)
128 if(data < 0x96)
129 btn |= BUTTON_RC_REC;
130 else
131 btn |= BUTTON_RC_MENU;
132 else
133 if(data < 0xd1)
134 btn |= BUTTON_RC_VOL_UP;
135 else
136 btn |= BUTTON_RC_VOL_DOWN;
137 }
138 }
139
140 data = GPIO_READ;
141
142 /* hold and power are mutually exclusive */
143 if (!(data & 0x04000000))
144 btn |= BUTTON_POWER;
145
146 /* remote play button should be dead if hold */
147 if (!remote_hold_button && !(data & 0x02000000))
148 btn |= BUTTON_RC_PLAY;
149
150 return btn;
151}
diff --git a/firmware/target/coldfire/iaudio/m5/lcd-as-m5.S b/firmware/target/coldfire/iaudio/m5/lcd-as-m5.S
new file mode 100644
index 0000000000..c973dc2c40
--- /dev/null
+++ b/firmware/target/coldfire/iaudio/m5/lcd-as-m5.S
@@ -0,0 +1,83 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Jens Arnold
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19
20#include "config.h"
21#include "cpu.h"
22
23 .section .icode,"ax",@progbits
24
25 .align 2
26 .global lcd_write_command
27 .type lcd_write_command,@function
28
29lcd_write_command:
30 move.l (4, %sp), %d0
31 move.w %d0, 0xf0008000
32 rts
33.wc_end:
34 .size lcd_write_command,.wc_end-lcd_write_command
35
36
37 .align 2
38 .global lcd_write_command_ex
39 .type lcd_write_command_ex,@function
40
41lcd_write_command_ex:
42 lea.l 0xf0008000, %a0
43
44 move.l (4, %sp), %d0 /* Command */
45 move.w %d0, (%a0)+ /* Write to LCD, set A0 = 1 */
46
47 move.l (8, %sp), %d0 /* Data */
48 cmp.l #-1, %d0 /* -1? */
49 beq.b .last
50 move.w %d0, (%a0) /* Write to LCD */
51
52 move.l (12, %sp), %d0 /* Data */
53 cmp.l #-1, %d0 /* -1? */
54 beq.b .last
55 move.w %d0, (%a0) /* Write to LCD */
56
57.last:
58 rts
59.wcex_end:
60 .size lcd_write_command_ex,.wcex_end-lcd_write_command_ex
61
62
63 .align 2
64 .global lcd_write_data
65 .type lcd_write_data,@function
66
67lcd_write_data:
68 move.l (4,%sp), %a0 /* Data pointer */
69 move.l (8,%sp), %d0 /* Length */
70
71 lea 0xf0008002, %a1
72.loop:
73 /* When running in IRAM, this loop takes 7 cycles plus the LCD write.
74 The 7 cycles are necessary to follow the LCD timing specs
75 at 140MHz */
76 move.b (%a0)+, %d1 /* 3(1/0) */
77 move.w %d1, (%a1) /* 1(0/1) */
78 subq.l #1, %d0 /* 1(0/0) */
79 nop /* 1(0/0) */
80 bne .loop /* 2(0/0) */
81 rts
82.wd_end:
83 .size lcd_write_data,.wd_end-lcd_write_data
diff --git a/firmware/target/coldfire/iaudio/m5/lcd-m5.c b/firmware/target/coldfire/iaudio/m5/lcd-m5.c
new file mode 100644
index 0000000000..2af46b3145
--- /dev/null
+++ b/firmware/target/coldfire/iaudio/m5/lcd-m5.c
@@ -0,0 +1,219 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2007 by Jens Arnold
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "config.h"
20
21#include "system.h"
22#include "kernel.h"
23#include "lcd.h"
24
25/*** definitions ***/
26
27/* LCD command codes */
28#define LCD_CNTL_POWER_CONTROL 0x25
29#define LCD_CNTL_VOLTAGE_SELECT 0x2b
30#define LCD_CNTL_LINE_INVERT_DRIVE 0x36
31#define LCD_CNTL_GRAY_SCALE_PATTERN 0x39
32#define LCD_CNTL_TEMP_GRADIENT_SELECT 0x4e
33#define LCD_CNTL_OSC_FREQUENCY 0x5f
34#define LCD_CNTL_ON_OFF 0xae
35#define LCD_CNTL_OSC_ON_OFF 0xaa
36#define LCD_CNTL_OFF_MODE 0xbe
37#define LCD_CNTL_POWER_SAVE 0xa8
38#define LCD_CNTL_REVERSE 0xa6
39#define LCD_CNTL_ALL_LIGHTING 0xa4
40#define LCD_CNTL_COMMON_OUTPUT_STATUS 0xc4
41#define LCD_CNTL_COLUMN_ADDRESS_DIR 0xa0
42#define LCD_CNTL_NLINE_ON_OFF 0xe4
43#define LCD_CNTL_DISPLAY_MODE 0x66
44#define LCD_CNTL_DUTY_SET 0x6d
45#define LCD_CNTL_ELECTRONIC_VOLUME 0x81
46#define LCD_CNTL_DATA_INPUT_DIR 0x84
47#define LCD_CNTL_DISPLAY_START_LINE 0x8a
48#define LCD_CNTL_AREA_SCROLL 0x10
49
50#define LCD_CNTL_PAGE 0xb1
51#define LCD_CNTL_COLUMN 0x13
52#define LCD_CNTL_DATA_WRITE 0x1d
53
54/*** shared semi-private declarations ***/
55extern const unsigned char lcd_dibits[16] ICONST_ATTR;
56
57/*** hardware configuration ***/
58int lcd_default_contrast(void)
59{
60 return DEFAULT_CONTRAST_SETTING;
61}
62
63void lcd_set_contrast(int val)
64{
65 /* Keep val in acceptable hw range */
66 if (val < 0)
67 val = 0;
68 else if (val > 127)
69 val = 127;
70
71 lcd_write_command_ex(LCD_CNTL_ELECTRONIC_VOLUME, val, -1);
72}
73
74void lcd_set_invert_display(bool yesno)
75{
76 lcd_write_command(LCD_CNTL_REVERSE | (yesno?1:0));
77}
78
79/* turn the display upside down (call lcd_update() afterwards) */
80void lcd_set_flip(bool yesno)
81{
82 if (yesno)
83 {
84 lcd_write_command(LCD_CNTL_COLUMN_ADDRESS_DIR | 0);
85 lcd_write_command(LCD_CNTL_COMMON_OUTPUT_STATUS | 1);
86 lcd_write_command_ex(LCD_CNTL_DUTY_SET, 0x20, 2);
87 }
88 else
89 {
90 lcd_write_command(LCD_CNTL_COLUMN_ADDRESS_DIR | 1);
91 lcd_write_command(LCD_CNTL_COMMON_OUTPUT_STATUS | 0);
92 lcd_write_command_ex(LCD_CNTL_DUTY_SET, 0x20, 1);
93 }
94}
95
96void lcd_init_device(void)
97{
98 /* LCD Reset */
99 and_l(~0x00000010, &GPIO1_OUT);
100 or_l(0x00000010, &GPIO1_ENABLE);
101 or_l(0x00000010, &GPIO1_FUNCTION);
102 sleep(1);
103 or_l(0x00000010, &GPIO1_OUT);
104 sleep(1);
105
106 lcd_write_command(LCD_CNTL_ON_OFF | 1); /* LCD ON */
107 lcd_write_command(LCD_CNTL_OFF_MODE | 1); /* OFF -> VCC on drivers */
108 lcd_write_command(LCD_CNTL_REVERSE | 0); /* Reverse OFF */
109 lcd_write_command(LCD_CNTL_ALL_LIGHTING | 0); /* Normal */
110 lcd_write_command(LCD_CNTL_COMMON_OUTPUT_STATUS | 0); /* Normal dir */
111 lcd_write_command_ex(LCD_CNTL_DISPLAY_START_LINE, 4, -1);
112 lcd_write_command(LCD_CNTL_COLUMN_ADDRESS_DIR | 1); /* Reverse */
113 lcd_write_command_ex(LCD_CNTL_DISPLAY_MODE, 0, -1); /* Greyscale mode */
114 lcd_write_command_ex(LCD_CNTL_GRAY_SCALE_PATTERN, 0x53, -1);
115 lcd_write_command_ex(LCD_CNTL_DUTY_SET, 0x20, 1);
116 lcd_write_command_ex(LCD_CNTL_ELECTRONIC_VOLUME, 40, -1);
117
118 lcd_write_command(LCD_CNTL_OSC_ON_OFF | 1); /* Oscillator ON */
119 lcd_write_command(LCD_CNTL_POWER_SAVE | 0);
120 lcd_write_command_ex(LCD_CNTL_VOLTAGE_SELECT, 3, -1);
121 lcd_write_command_ex(LCD_CNTL_POWER_CONTROL, 0x17, -1);
122 lcd_write_command_ex(LCD_CNTL_OSC_FREQUENCY, 3, -1);
123 lcd_write_command(LCD_CNTL_NLINE_ON_OFF | 1); /* N-line ON */
124 lcd_write_command_ex(LCD_CNTL_LINE_INVERT_DRIVE, 0x10, -1);
125 lcd_write_command_ex(LCD_CNTL_TEMP_GRADIENT_SELECT, 0, -1);
126
127 lcd_update();
128}
129
130/*** update functions ***/
131
132/* Performance function that works with an external buffer
133 note that by and bheight are in 8-pixel units! */
134void lcd_blit(const unsigned char* data, int x, int by, int width,
135 int bheight, int stride)
136{
137 const unsigned char *src, *src_end;
138 unsigned char *dst_u, *dst_l;
139 static unsigned char upper[LCD_WIDTH] IBSS_ATTR;
140 static unsigned char lower[LCD_WIDTH] IBSS_ATTR;
141 unsigned int byte;
142
143 by *= 2;
144
145 while (bheight--)
146 {
147 src = data;
148 src_end = data + width;
149 dst_u = upper;
150 dst_l = lower;
151 do
152 {
153 byte = *src++;
154 *dst_u++ = lcd_dibits[byte & 0x0F];
155 byte >>= 4;
156 *dst_l++ = lcd_dibits[byte & 0x0F];
157 }
158 while (src < src_end);
159
160 lcd_write_command_ex(LCD_CNTL_PAGE, by++, -1);
161 lcd_write_command_ex(LCD_CNTL_COLUMN, x, -1);
162 lcd_write_command(LCD_CNTL_DATA_WRITE);
163 lcd_write_data(upper, width);
164
165 lcd_write_command_ex(LCD_CNTL_PAGE, by++, -1);
166 lcd_write_command_ex(LCD_CNTL_COLUMN, x, -1);
167 lcd_write_command(LCD_CNTL_DATA_WRITE);
168 lcd_write_data(lower, width);
169
170 data += stride;
171 }
172}
173
174
175/* Update the display.
176 This must be called after all other LCD functions that change the display. */
177void lcd_update(void) ICODE_ATTR;
178void lcd_update(void)
179{
180 int y;
181
182 /* Copy display bitmap to hardware */
183 for (y = 0; y < LCD_FBHEIGHT; y++)
184 {
185 lcd_write_command_ex(LCD_CNTL_PAGE, y, -1);
186 lcd_write_command_ex(LCD_CNTL_COLUMN, 0, -1);
187
188 lcd_write_command(LCD_CNTL_DATA_WRITE);
189 lcd_write_data (lcd_framebuffer[y], LCD_WIDTH);
190 }
191}
192
193/* Update a fraction of the display. */
194void lcd_update_rect(int, int, int, int) ICODE_ATTR;
195void lcd_update_rect(int x, int y, int width, int height)
196{
197 int ymax;
198
199 /* The Y coordinates have to work on even 8 pixel rows */
200 ymax = (y + height-1) >> 2;
201 y >>= 2;
202
203 if(x + width > LCD_WIDTH)
204 width = LCD_WIDTH - x;
205 if (width <= 0)
206 return; /* nothing left to do, 0 is harmful to lcd_write_data() */
207 if(ymax >= LCD_FBHEIGHT)
208 ymax = LCD_FBHEIGHT-1;
209
210 /* Copy specified rectange bitmap to hardware */
211 for (; y <= ymax; y++)
212 {
213 lcd_write_command_ex(LCD_CNTL_PAGE, y, -1);
214 lcd_write_command_ex(LCD_CNTL_COLUMN, x, -1);
215
216 lcd_write_command(LCD_CNTL_DATA_WRITE);
217 lcd_write_data (&lcd_framebuffer[y][x], width);
218 }
219}
diff --git a/firmware/target/coldfire/iaudio/m5/power-m5.c b/firmware/target/coldfire/iaudio/m5/power-m5.c
new file mode 100644
index 0000000000..c689488bfe
--- /dev/null
+++ b/firmware/target/coldfire/iaudio/m5/power-m5.c
@@ -0,0 +1,89 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#include "config.h"
20#include "cpu.h"
21#include <stdbool.h>
22#include "kernel.h"
23#include "system.h"
24#include "power.h"
25#include "pcf50606.h"
26#include "lcd-remote-target.h"
27
28#ifndef SIMULATOR
29
30void power_init(void)
31{
32 /* Charger detect */
33 and_l(~0x01000000, &GPIO1_ENABLE);
34 or_l(0x01000000, &GPIO1_FUNCTION);
35
36 pcf50606_init();
37}
38
39bool charger_inserted(void)
40{
41 return (GPIO1_READ & 0x01000000)?true:false;
42}
43
44void ide_power_enable(bool on)
45{
46 /* GPOOD3 */
47 int level = set_irq_level(HIGHEST_IRQ_LEVEL);
48 if(on)
49 pcf50606_write(0x3c, 0x07);
50 else
51 pcf50606_write(0x3c, 0x00);
52 set_irq_level(level);
53}
54
55bool ide_powered(void)
56{
57 return false;
58}
59
60void power_off(void)
61{
62 lcd_remote_poweroff();
63 set_irq_level(HIGHEST_IRQ_LEVEL);
64 and_l(~0x00000008, &GPIO_OUT); /* Set KEEPACT low */
65 asm("halt");
66}
67
68#else
69
70bool charger_inserted(void)
71{
72 return false;
73}
74
75void charger_enable(bool on)
76{
77 (void)on;
78}
79
80void power_off(void)
81{
82}
83
84void ide_power_enable(bool on)
85{
86 (void)on;
87}
88
89#endif /* SIMULATOR */
diff --git a/firmware/target/coldfire/iaudio/x5/pcf50606-x5.c b/firmware/target/coldfire/iaudio/pcf50606-iaudio.c
index f8f6c1d675..f8f6c1d675 100644
--- a/firmware/target/coldfire/iaudio/x5/pcf50606-x5.c
+++ b/firmware/target/coldfire/iaudio/pcf50606-iaudio.c
diff --git a/firmware/target/coldfire/iaudio/x5/system-x5.c b/firmware/target/coldfire/iaudio/system-iaudio.c
index 30a4f6e71b..30a4f6e71b 100644
--- a/firmware/target/coldfire/iaudio/x5/system-x5.c
+++ b/firmware/target/coldfire/iaudio/system-iaudio.c
diff --git a/firmware/target/coldfire/iaudio/x5/usb-x5.c b/firmware/target/coldfire/iaudio/usb-iaudio.c
index 3bd1a7a458..3bd1a7a458 100644
--- a/firmware/target/coldfire/iaudio/x5/usb-x5.c
+++ b/firmware/target/coldfire/iaudio/usb-iaudio.c
diff --git a/firmware/target/coldfire/iaudio/usb-target.h b/firmware/target/coldfire/iaudio/usb-target.h
new file mode 100644
index 0000000000..ab8cac6f99
--- /dev/null
+++ b/firmware/target/coldfire/iaudio/usb-target.h
@@ -0,0 +1,24 @@
1/***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
9 *
10 * Copyright (C) 2006 by Linus Nielsen Feltzing
11 *
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
14 *
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
17 *
18 ****************************************************************************/
19#ifndef USB_TARGET_H
20#define USB_TARGET_H
21
22bool usb_init_device(void);
23
24#endif
diff --git a/firmware/target/coldfire/pcm-coldfire.c b/firmware/target/coldfire/pcm-coldfire.c
index 5c7186e567..8738316aa9 100644
--- a/firmware/target/coldfire/pcm-coldfire.c
+++ b/firmware/target/coldfire/pcm-coldfire.c
@@ -46,7 +46,7 @@ static int peaks[4]; /* p-l, p-r, r-l, r-r */
46 (4 << 2) ) /* 64 bit clocks / word clock */ 46 (4 << 2) ) /* 64 bit clocks / word clock */
47#define IIS_RESET 0x800 47#define IIS_RESET 0x800
48 48
49#ifdef IAUDIO_X5 49#if defined(IAUDIO_X5) || defined(IAUDIO_M5)
50#define SET_IIS_CONFIG(x) IIS1CONFIG = (x); 50#define SET_IIS_CONFIG(x) IIS1CONFIG = (x);
51#define IIS_CONFIG IIS1CONFIG 51#define IIS_CONFIG IIS1CONFIG
52#define PLLCR_SET_AUDIO_BITS_DEFPARM \ 52#define PLLCR_SET_AUDIO_BITS_DEFPARM \
diff --git a/firmware/target/coldfire/system-coldfire.c b/firmware/target/coldfire/system-coldfire.c
index c3b2631cb0..bc769877ba 100644
--- a/firmware/target/coldfire/system-coldfire.c
+++ b/firmware/target/coldfire/system-coldfire.c
@@ -136,7 +136,7 @@ default_interrupt (CDROMNOSYNC); /* CD-ROM No sync */
136default_interrupt (CDROMILSYNC); /* CD-ROM Illegal sync */ 136default_interrupt (CDROMILSYNC); /* CD-ROM Illegal sync */
137default_interrupt (CDROMNEWBLK); /* CD-ROM New block */ 137default_interrupt (CDROMNEWBLK); /* CD-ROM New block */
138 138
139#ifdef IAUDIO_X5 139#if defined(IAUDIO_X5) || defined(IAUDIO_M5)
140#define EXCP_BUTTON_GPIO_READ GPIO_READ 140#define EXCP_BUTTON_GPIO_READ GPIO_READ
141#define EXCP_BUTTON_MASK 0x0c000000 141#define EXCP_BUTTON_MASK 0x0c000000
142#define EXCP_BUTTON_VALUE 0x08000000 /* On button and !hold */ 142#define EXCP_BUTTON_VALUE 0x08000000 /* On button and !hold */
diff --git a/uisimulator/sdl/UI-m5.bmp b/uisimulator/sdl/UI-m5.bmp
new file mode 100644
index 0000000000..18bdf9a512
--- /dev/null
+++ b/uisimulator/sdl/UI-m5.bmp
Binary files differ
diff --git a/uisimulator/sdl/uisdl.h b/uisimulator/sdl/uisdl.h
index 7f0a567e79..a0551f1201 100644
--- a/uisimulator/sdl/uisdl.h
+++ b/uisimulator/sdl/uisdl.h
@@ -189,6 +189,24 @@
189#define UI_REMOTE_WIDTH 128 189#define UI_REMOTE_WIDTH 128
190#define UI_REMOTE_HEIGHT 96 190#define UI_REMOTE_HEIGHT 96
191 191
192#elif defined(IAUDIO_M5)
193#define UI_TITLE "iAudio M5"
194#define UI_WIDTH 300 /* width of GUI window */
195#define UI_HEIGHT 558 /* height of GUI window */
196/* high-colour */
197#define UI_LCD_POSX 55 /* x position of lcd */
198#define UI_LCD_POSY 61 /* y position of lcd (74 for real aspect) */
199#define UI_LCD_BGCOLOR 100, 135, 100 /* bkgnd color of LCD (no backlight) */
200#define UI_LCD_BGCOLORLIGHT 223, 216, 255 /* bkgnd color of LCD (backlight) */
201#define UI_LCD_WIDTH LCD_WIDTH /* * 1.5 */
202#define UI_LCD_HEIGHT LCD_HEIGHT /* * 1.5 */
203#define UI_REMOTE_BGCOLOR 90, 145, 90 /* bkgnd of remote lcd (no bklight) */
204#define UI_REMOTE_BGCOLORLIGHT 130, 180, 250 /* bkgnd of remote lcd (bklight) */
205#define UI_REMOTE_POSX 12 /* x position of remote lcd */
206#define UI_REMOTE_POSY 462 /* y position of remote lcd */
207#define UI_REMOTE_WIDTH 128
208#define UI_REMOTE_HEIGHT 96
209
192#elif defined(GIGABEAT_F) 210#elif defined(GIGABEAT_F)
193#define UI_TITLE "Toshiba Gigabeat" 211#define UI_TITLE "Toshiba Gigabeat"
194#define UI_WIDTH 401 /* width of GUI window */ 212#define UI_WIDTH 401 /* width of GUI window */