Critical Bug fixed in text rendering function
Still only portrait Orientation is supported byS6D1121. Added stubs
This commit is contained in:
parent
da7493da8b
commit
be23213164
1 changed files with 6 additions and 14 deletions
|
@ -96,13 +96,9 @@ void lcdWriteData(uint16_t lcdData) {
|
||||||
|
|
||||||
void lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
|
void lcdWriteReg(uint16_t lcdReg, uint16_t lcdRegValue) {
|
||||||
LCD_CS_LOW;
|
LCD_CS_LOW;
|
||||||
LCD_RS_LOW;
|
|
||||||
|
|
||||||
lld_lcdwrite(lcdReg);
|
lcdWriteIndex(lcdReg);
|
||||||
|
lcdWriteData(lcdRegValue);
|
||||||
LCD_RS_HIGH;
|
|
||||||
|
|
||||||
lld_lcdwrite(lcdRegValue);
|
|
||||||
|
|
||||||
LCD_CS_HIGH;
|
LCD_CS_HIGH;
|
||||||
}
|
}
|
||||||
|
@ -215,26 +211,22 @@ void lld_lcdSetOrientation(uint8_t newOrientation) {
|
||||||
|
|
||||||
switch(orientation) {
|
switch(orientation) {
|
||||||
case portrait:
|
case portrait:
|
||||||
lcdWriteReg(0x0001, 0x2B3F);
|
lcdWriteReg(0x03, 0x03);
|
||||||
lcdWriteReg(0x0011, 0x6070);
|
|
||||||
lcd_height = SCREEN_HEIGHT;
|
lcd_height = SCREEN_HEIGHT;
|
||||||
lcd_width = SCREEN_WIDTH;
|
lcd_width = SCREEN_WIDTH;
|
||||||
break;
|
break;
|
||||||
case landscape:
|
case landscape:
|
||||||
lcdWriteReg(0x0001, 0x293F);
|
// Not implemented yet
|
||||||
lcdWriteReg(0x0011, 0x6078);
|
|
||||||
lcd_height = SCREEN_WIDTH;
|
lcd_height = SCREEN_WIDTH;
|
||||||
lcd_width = SCREEN_HEIGHT;
|
lcd_width = SCREEN_HEIGHT;
|
||||||
break;
|
break;
|
||||||
case portraitInv:
|
case portraitInv:
|
||||||
lcdWriteReg(0x0001, 0x693F);
|
// Not implemented yet
|
||||||
lcdWriteReg(0x0011, 0x6040);
|
|
||||||
lcd_height = SCREEN_HEIGHT;
|
lcd_height = SCREEN_HEIGHT;
|
||||||
lcd_width = SCREEN_WIDTH;
|
lcd_width = SCREEN_WIDTH;
|
||||||
break;
|
break;
|
||||||
case landscapeInv:
|
case landscapeInv:
|
||||||
lcdWriteReg(0x0001, 0x6B3F);
|
// Not implemented yet
|
||||||
lcdWriteReg(0x0011, 0x6048);
|
|
||||||
lcd_height = SCREEN_WIDTH;
|
lcd_height = SCREEN_WIDTH;
|
||||||
lcd_width = SCREEN_HEIGHT;
|
lcd_width = SCREEN_HEIGHT;
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue