Clip+ LCD: support devices with a different controller

The new controller framebuffer (different from what is in clipv1/clipv2 and some clip+) has 128 columns, the old has 132 columns and is centered on the screen.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27257 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Rafaël Carré 2010-07-03 18:50:07 +00:00
parent 12b89c11e3
commit 9a471e603e
7 changed files with 25 additions and 19 deletions

View file

@ -26,7 +26,7 @@
#include "system.h"
#include "cpu.h"
void lcd_hw_init(void)
void lcd_hw_init(int *offset)
{
bitset32(&CGU_PERI, CGU_SSP_CLOCK_ENABLE);
@ -37,8 +37,11 @@ void lcd_hw_init(void)
GPIOA_DIR |= (1<<5);
GPIOB_DIR |= (1<<2) | (1<<7);
GPIOB_DIR &= ~(1<<3);
GPIOB_PIN(7) = 0;
GPIOA_PIN(5) = (1<<5);
*offset = GPIOB_PIN(3) ? 0 : 2;
}
void lcd_write_command(int byte)

View file

@ -21,7 +21,7 @@
#include "config.h"
void lcd_hw_init(void) INIT_ATTR;
void lcd_hw_init(int *offset) INIT_ATTR;
static inline void lcd_enable_power(bool onoff)
{
(void) onoff;