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
This commit is contained in:
Rafaël Carré 2009-06-17 19:55:27 +00:00
parent bc1fd05dc1
commit 3520d8e90e
8 changed files with 286 additions and 602 deletions

View file

@ -27,7 +27,7 @@
#include <inttypes.h>
#include "config.h"
#include "lcd.h"
#include "backlight-target.h"
#include "backlight.h"
#include "button-target.h"
#include "common.h"
#include "storage.h"
@ -48,14 +48,12 @@ void main(void)
system_init();
kernel_init();
#ifdef SANSA_C200V2
/* stop here */
while(1);
#endif
enable_irq();
lcd_init();
show_logo();
_backlight_on();
backlight_init();
button_init_device();
int btn = button_read_device();
@ -79,8 +77,6 @@ void main(void)
verbose = true;
}
enable_irq();
ret = storage_init();
if(ret < 0)
error(EATA,ret);