diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-17 19:55:27 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2009-06-17 19:55:27 +0000 |
commit | 3520d8e90e7f6e3ffc88f8d1ff47fa3cc0efe960 (patch) | |
tree | 814a3bcd5d0fc6ee0c99d57d5f188e7f113ec29f /bootloader/sansa_as3525.c | |
parent | bc1fd05dc1f025bdeb2e79fb552472775bedd156 (diff) | |
download | rockbox-3520d8e90e7f6e3ffc88f8d1ff47fa3cc0efe960.tar.gz rockbox-3520d8e90e7f6e3ffc88f8d1ff47fa3cc0efe960.zip |
Sansa c200v2 : lcd & backlight support, using the c200v1 lcd driver
The LCD driver is unified and lcd_send_command now takes 2 arguments : the command and its argument.
If there is no argument, it's set to 0 and a NOP command is issued
If there is more than one argument (set X/Y address), the 2nd argument is sent as a 2nd command, and a NOP command is issued after it.
Benefit : c200v2 transfers the command and the argument in one 16 bits transfer
Performance should not be affected since commands without argument are only used in lcd_init() and lcd_enable()
lcd_send_data() now transfers whole lines (or columns) instead of single pixels
yuv is disabled for c200v2 for now
Some buttons can be read, including left button (bit 6 of DBOP_DIN), but for some reason they have no effect in rockbox: to be investigated
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21321 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'bootloader/sansa_as3525.c')
-rw-r--r-- | bootloader/sansa_as3525.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/bootloader/sansa_as3525.c b/bootloader/sansa_as3525.c index 48f21bc196..7e6ac2dddb 100644 --- a/bootloader/sansa_as3525.c +++ b/bootloader/sansa_as3525.c | |||
@@ -27,7 +27,7 @@ | |||
27 | #include <inttypes.h> | 27 | #include <inttypes.h> |
28 | #include "config.h" | 28 | #include "config.h" |
29 | #include "lcd.h" | 29 | #include "lcd.h" |
30 | #include "backlight-target.h" | 30 | #include "backlight.h" |
31 | #include "button-target.h" | 31 | #include "button-target.h" |
32 | #include "common.h" | 32 | #include "common.h" |
33 | #include "storage.h" | 33 | #include "storage.h" |
@@ -48,14 +48,12 @@ void main(void) | |||
48 | system_init(); | 48 | system_init(); |
49 | kernel_init(); | 49 | kernel_init(); |
50 | 50 | ||
51 | #ifdef SANSA_C200V2 | 51 | enable_irq(); |
52 | /* stop here */ | 52 | |
53 | while(1); | ||
54 | #endif | ||
55 | lcd_init(); | 53 | lcd_init(); |
56 | show_logo(); | 54 | show_logo(); |
57 | 55 | ||
58 | _backlight_on(); | 56 | backlight_init(); |
59 | 57 | ||
60 | button_init_device(); | 58 | button_init_device(); |
61 | int btn = button_read_device(); | 59 | int btn = button_read_device(); |
@@ -79,8 +77,6 @@ void main(void) | |||
79 | verbose = true; | 77 | verbose = true; |
80 | } | 78 | } |
81 | 79 | ||
82 | enable_irq(); | ||
83 | |||
84 | ret = storage_init(); | 80 | ret = storage_init(); |
85 | if(ret < 0) | 81 | if(ret < 0) |
86 | error(EATA,ret); | 82 | error(EATA,ret); |