diff options
Diffstat (limited to 'drivers/gdisp')
25 files changed, 65 insertions, 39 deletions
diff --git a/drivers/gdisp/ILI9320/gdisp_lld.c b/drivers/gdisp/ILI9320/gdisp_lld.c index 0d1e969c..ada0f27d 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld.c +++ b/drivers/gdisp/ILI9320/gdisp_lld.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
@@ -237,20 +237,39 @@ static void lld_lcdSetCursor(uint16_t x, uint16_t y) { addr = y * 0x100 + x;
- lld_lcdWriteReg(0x0020, addr & 0xff); /* low addr */
- lld_lcdWriteReg(0x0021, (addr >> 8) & 0x1ff); /* high addr */
+ switch(GDISP.Orientation) {
+ case GDISP_ROTATE_0:
+ lld_lcdWriteReg(0x0020, addr & 0xff); /* low addr */
+ lld_lcdWriteReg(0x0021, (addr >> 8) & 0x1ff); /* high addr */
+ break;
+
+ case GDISP_ROTATE_90:
+ lld_lcdWriteReg(0x0020, (addr >> 8) & 0x1ff); /* low addr */
+ lld_lcdWriteReg(0x0021, addr & 0xff); /* high addr */
+ break;
+
+ case GDISP_ROTATE_180:
+ break;
+
+ case GDISP_ROTATE_270:
+ break;
+ }
}
static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy) {
switch(GDISP.Orientation) {
case GDISP_ROTATE_0:
- lld_lcdWriteReg(0x0050, x - 1);
- lld_lcdWriteReg(0x0051, x + cx - 2);
- lld_lcdWriteReg(0x0052, y - 1);
- lld_lcdWriteReg(0x0053, y + cy - 2);
+ lld_lcdWriteReg(0x0050, x);
+ lld_lcdWriteReg(0x0051, x + cx - 1);
+ lld_lcdWriteReg(0x0052, y);
+ lld_lcdWriteReg(0x0053, y + cy - 1);
break;
case GDISP_ROTATE_90:
+ lld_lcdWriteReg(0x0050, y);
+ lld_lcdWriteReg(0x0051, y + cy - 1);
+ lld_lcdWriteReg(0x0052, x);
+ lld_lcdWriteReg(0x0053, x + cx - 1);
break;
case GDISP_ROTATE_180:
@@ -265,7 +284,16 @@ static void lld_lcdSetViewPort(uint16_t x, uint16_t y, uint16_t cx, uint16_t cy) }
static __inline void lld_lcdResetViewPort(void) {
- /* ToDo */
+ switch(GDISP.Orientation) {
+ case GDISP_ROTATE_0:
+ case GDISP_ROTATE_180:
+ lld_lcdSetViewPort(0, 0, GDISP_SCREEN_WIDTH, GDISP_SCREEN_HEIGHT);
+ break;
+ case GDISP_ROTATE_90:
+ case GDISP_ROTATE_270:
+ lld_lcdSetViewPort(0, 0, GDISP_SCREEN_HEIGHT, GDISP_SCREEN_WIDTH);
+ break;
+ }
}
void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) {
@@ -479,20 +507,20 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) { GDISP.Powermode = (gdisp_powermode_t)value;
return;
-#if 0
- // NOT IMPLEMENTED YET
case GDISP_CONTROL_ORIENTATION:
if(GDISP.Orientation == (gdisp_orientation_t)value)
return;
switch((gdisp_orientation_t)value) {
case GDISP_ROTATE_0:
- /* ToDo */
+ lld_lcdWriteReg(0x0001, 0x0100);
+ lld_lcdWriteReg(0x0003, 0x1038);
GDISP.Height = GDISP_SCREEN_HEIGHT;
GDISP.Width = GDISP_SCREEN_WIDTH;
break;
case GDISP_ROTATE_90:
- /* ToDo */
+ lld_lcdWriteReg(0x0001, 0x0000);
+ lld_lcdWriteReg(0x0003, 0x1030);
GDISP.Height = GDISP_SCREEN_WIDTH;
GDISP.Width = GDISP_SCREEN_HEIGHT;
break;
@@ -521,7 +549,6 @@ void GDISP_LLD(drawpixel)(coord_t x, coord_t y, color_t color) { #endif
GDISP.Orientation = (gdisp_orientation_t)value;
return;
-#endif
case GDISP_CONTROL_BACKLIGHT:
if((unsigned)value > 100) value = (void *)100;
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_board_example.h b/drivers/gdisp/ILI9320/gdisp_lld_board_example.h index b929a3c3..48221b3a 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld_board_example.h +++ b/drivers/gdisp/ILI9320/gdisp_lld_board_example.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h b/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h index 0b926bb8..a6d9d631 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h +++ b/drivers/gdisp/ILI9320/gdisp_lld_board_olimex_stm32_lcd.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
@@ -44,8 +44,7 @@ static __inline void GDISP_LLD(init_board)(void) { palSetPadMode(GPIOE, GPIOE_TFT_RST, PAL_MODE_OUTPUT_PUSHPULL);
palSetPadMode(GPIOD, GPIOD_TFT_LIGHT, PAL_MODE_OUTPUT_PUSHPULL);
- /* const unsigned char FSMC_Bank = 0; */
- const unsigned char FSMC_Bank = 6;
+ const unsigned char FSMC_Bank = 0;
/* FSMC timing */
FSMC_Bank1->BTCR[FSMC_Bank+1] = (6) | (10 << 8) | (10 << 16);
diff --git a/drivers/gdisp/ILI9320/gdisp_lld_config.h b/drivers/gdisp/ILI9320/gdisp_lld_config.h index 2fe89a14..ca534568 100644 --- a/drivers/gdisp/ILI9320/gdisp_lld_config.h +++ b/drivers/gdisp/ILI9320/gdisp_lld_config.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/Nokia6610/GE12.h b/drivers/gdisp/Nokia6610/GE12.h index 668f475d..6c980e2e 100644 --- a/drivers/gdisp/Nokia6610/GE12.h +++ b/drivers/gdisp/Nokia6610/GE12.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/Nokia6610/GE8.h b/drivers/gdisp/Nokia6610/GE8.h index ea835e1b..789308a9 100644 --- a/drivers/gdisp/Nokia6610/GE8.h +++ b/drivers/gdisp/Nokia6610/GE8.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/Nokia6610/gdisp_lld.c b/drivers/gdisp/Nokia6610/gdisp_lld.c index 661d6a77..47df5bb2 100644 --- a/drivers/gdisp/Nokia6610/gdisp_lld.c +++ b/drivers/gdisp/Nokia6610/gdisp_lld.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/Nokia6610/gdisp_lld_board_example.h b/drivers/gdisp/Nokia6610/gdisp_lld_board_example.h index de8eb6ce..c8528f9e 100644 --- a/drivers/gdisp/Nokia6610/gdisp_lld_board_example.h +++ b/drivers/gdisp/Nokia6610/gdisp_lld_board_example.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/Nokia6610/gdisp_lld_board_olimexsam7ex256.h b/drivers/gdisp/Nokia6610/gdisp_lld_board_olimexsam7ex256.h index 3d1e6ceb..0b5756d0 100644 --- a/drivers/gdisp/Nokia6610/gdisp_lld_board_olimexsam7ex256.h +++ b/drivers/gdisp/Nokia6610/gdisp_lld_board_olimexsam7ex256.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/Nokia6610/gdisp_lld_config.h b/drivers/gdisp/Nokia6610/gdisp_lld_config.h index f751020f..e7583b54 100644 --- a/drivers/gdisp/Nokia6610/gdisp_lld_config.h +++ b/drivers/gdisp/Nokia6610/gdisp_lld_config.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/S6D1121/gdisp_lld.c b/drivers/gdisp/S6D1121/gdisp_lld.c index 49116ec1..5fac4b29 100644 --- a/drivers/gdisp/S6D1121/gdisp_lld.c +++ b/drivers/gdisp/S6D1121/gdisp_lld.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/S6D1121/gdisp_lld_board_example.h b/drivers/gdisp/S6D1121/gdisp_lld_board_example.h index c47a6ed6..00c4b869 100644 --- a/drivers/gdisp/S6D1121/gdisp_lld_board_example.h +++ b/drivers/gdisp/S6D1121/gdisp_lld_board_example.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/S6D1121/gdisp_lld_board_olimex_e407.h b/drivers/gdisp/S6D1121/gdisp_lld_board_olimex_e407.h index ad71d343..9abfa74c 100644 --- a/drivers/gdisp/S6D1121/gdisp_lld_board_olimex_e407.h +++ b/drivers/gdisp/S6D1121/gdisp_lld_board_olimex_e407.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/S6D1121/gdisp_lld_config.h b/drivers/gdisp/S6D1121/gdisp_lld_config.h index 95046946..c662d0e7 100644 --- a/drivers/gdisp/S6D1121/gdisp_lld_config.h +++ b/drivers/gdisp/S6D1121/gdisp_lld_config.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/SSD1289/gdisp_lld.c b/drivers/gdisp/SSD1289/gdisp_lld.c index 6ac55865..abcc4736 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld.c +++ b/drivers/gdisp/SSD1289/gdisp_lld.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_board_example.h b/drivers/gdisp/SSD1289/gdisp_lld_board_example.h index c47a6ed6..00c4b869 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld_board_example.h +++ b/drivers/gdisp/SSD1289/gdisp_lld_board_example.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_board_example_fsmc.h b/drivers/gdisp/SSD1289/gdisp_lld_board_example_fsmc.h index dd492f9d..76a5c04c 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld_board_example_fsmc.h +++ b/drivers/gdisp/SSD1289/gdisp_lld_board_example_fsmc.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h b/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h index 07cdfa12..9cff5a19 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h +++ b/drivers/gdisp/SSD1289/gdisp_lld_board_firebullstm32f103.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/SSD1289/gdisp_lld_config.h b/drivers/gdisp/SSD1289/gdisp_lld_config.h index bc49c764..dafbc90f 100644 --- a/drivers/gdisp/SSD1289/gdisp_lld_config.h +++ b/drivers/gdisp/SSD1289/gdisp_lld_config.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/TestStub/gdisp_lld.c b/drivers/gdisp/TestStub/gdisp_lld.c index f1373ccd..79181036 100644 --- a/drivers/gdisp/TestStub/gdisp_lld.c +++ b/drivers/gdisp/TestStub/gdisp_lld.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/TestStub/gdisp_lld_config.h b/drivers/gdisp/TestStub/gdisp_lld_config.h index ecf383a9..18c2de59 100644 --- a/drivers/gdisp/TestStub/gdisp_lld_config.h +++ b/drivers/gdisp/TestStub/gdisp_lld_config.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/VMT/gdisp_lld.c b/drivers/gdisp/VMT/gdisp_lld.c index 6291f3ce..1bacf1a7 100644 --- a/drivers/gdisp/VMT/gdisp_lld.c +++ b/drivers/gdisp/VMT/gdisp_lld.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/VMT/gdisp_lld_config.h b/drivers/gdisp/VMT/gdisp_lld_config.h index 5f02f1d8..8c7bfc9c 100644 --- a/drivers/gdisp/VMT/gdisp_lld_config.h +++ b/drivers/gdisp/VMT/gdisp_lld_config.h @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/VMT/gdisp_lld_driver1.c b/drivers/gdisp/VMT/gdisp_lld_driver1.c index 5bfaaa85..06dadc54 100644 --- a/drivers/gdisp/VMT/gdisp_lld_driver1.c +++ b/drivers/gdisp/VMT/gdisp_lld_driver1.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
diff --git a/drivers/gdisp/VMT/gdisp_lld_driver2.c b/drivers/gdisp/VMT/gdisp_lld_driver2.c index 961c43b3..5dca0b27 100644 --- a/drivers/gdisp/VMT/gdisp_lld_driver2.c +++ b/drivers/gdisp/VMT/gdisp_lld_driver2.c @@ -1,5 +1,5 @@ /*
- ChibiOS/RT - Copyright (C) 2012
+ ChibiOS/GFX - Copyright (C) 2012
Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX.
|