1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2006 by Greg White
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 ****************************************************************************/
41 #include "rbunicode.h"
44 #include "bitmaps/rockboxlogo.h"
48 char version
[] = APPSVERSION
;
49 #define LONG_DELAY 200000
50 #define SHORT_DELAY 50000
51 #define PAUSE_DELAY 50000
53 static inline void delay(int duration
)
56 for(i
=0;i
<duration
;i
++);
60 void bl_debug(bool bit
)
64 PDAT0
^= (1 << 2); //Toggle backlight
66 PDAT0
^= (1 << 2); //Toggle backlight
71 PDAT0
^= (1 << 2); //Toggle backlight
73 PDAT0
^= (1 << 2); //Toggle backlight
78 void bl_debug_count(unsigned int input
)
82 for (i
= 0; i
< input
; i
++)
84 PDAT0
^= (1 << 2); //Toggle backlight
86 PDAT0
^= (1 << 2); //Toggle backlight
90 void bl_debug_int(unsigned int input
,unsigned int count
)
93 for (i
= 0; i
< count
; i
++)
95 bl_debug(input
>>i
& 1);
102 //Set backlight pin to output and enable
104 PCON0
= ((oldval
& ~(3 << 4)) | (1 << 4));
109 PCON1
= ((oldval
& ~(0xf << 16)) | (0 << 16));
111 lcd_bitmap(rockboxlogo
, 0, 0, BMPWIDTH_rockboxlogo
, BMPHEIGHT_rockboxlogo
);
114 // Wait for play to be pressed
115 while(!(PDAT1
& (1 << 4)));
116 // Wait for play to be released
117 while((PDAT1
& (1 << 4)));
118 PDAT0
^= (1 << 2); //Toggle backlight