summaryrefslogtreecommitdiff
path: root/bootloader/sansa_as3525.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2008-10-29 01:42:03 +0000
committerDave Chapman <dave@dchapman.com>2008-10-29 01:42:03 +0000
commit8df1a7e29abd51cc455844a9633e1cc5e057065f (patch)
treefeff4d97ffbbc1bf2d55076fa72f4d160c61de4e /bootloader/sansa_as3525.c
parentb771428d862cb6d1780f896550c177f2d5ae72a8 (diff)
downloadrockbox-8df1a7e29abd51cc455844a9633e1cc5e057065f.tar.gz
rockbox-8df1a7e29abd51cc455844a9633e1cc5e057065f.zip
e200v2: implement the backlight handling (copy/paste from the c200v1/e200v1 code - this should probably be unified, along with other upcoming v2 code), plus clean up the lcd init by calling lcd_init() directly in the bootloader, instead of lcd_init_device().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18910 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/sansa_as3525.c')
-rw-r--r--bootloader/sansa_as3525.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c
index 2a4f7f0ccb..a88e206c3b 100644
--- a/bootloader/sansa_as3525.c
+++ b/bootloader/sansa_as3525.c
@@ -25,10 +25,11 @@
25#include <stdio.h> 25#include <stdio.h>
26#include <system.h> 26#include <system.h>
27#include <inttypes.h> 27#include <inttypes.h>
28#include "lcd.h"
29#include "common.h"
30#include "config.h" 28#include "config.h"
29#include "lcd.h"
30#include "backlight-target.h"
31#include "as3525-codec.h" 31#include "as3525-codec.h"
32#include "common.h"
32 33
33int show_logo(void); 34int show_logo(void);
34void main(void) 35void main(void)
@@ -38,19 +39,15 @@ void main(void)
38 39
39 system_init(); 40 system_init();
40 41
41 lcd_init_device(); 42 lcd_init();
42 lcd_clear_display();
43 43
44 lcd_update(); 44 show_logo();
45 45
46#ifdef HAVE_LCD_ENABLE 46 as3525_codec_init(); /* Required for backlight on e200v2 */
47 lcd_enable(true);
48#endif
49 47
50 show_logo(); 48 _backlight_on();
51 49
52 /* show player id to demonstrate communication with codec part */ 50 /* show player id to demonstrate communication with codec part */
53 as3525_codec_init();
54 for (i = 0; i < 8; i++) { 51 for (i = 0; i < 8; i++) {
55 buf[i] = as3525_codec_read(0x38 + i); 52 buf[i] = as3525_codec_read(0x38 + i);
56 } 53 }