aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-07-08 02:52:22 +0200
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-07-08 02:52:22 +0200
commitc610eeb65c3c1fe6656959e2b42f7dd45540635c (patch)
tree852f0d0467cf134d4c6f88cac67fc85815b55987 /drivers/gdisp
parent43758829b8452499ea3d736028354b10f93721e8 (diff)
downloaduGFX-c610eeb65c3c1fe6656959e2b42f7dd45540635c.tar.gz
uGFX-c610eeb65c3c1fe6656959e2b42f7dd45540635c.tar.bz2
uGFX-c610eeb65c3c1fe6656959e2b42f7dd45540635c.zip
Remove obsolete ILI9341 stuff.
Diffstat (limited to 'drivers/gdisp')
-rw-r--r--drivers/gdisp/STM32F746Discovery/gdisp_lld_STM32F746Discovery.c73
1 files changed, 3 insertions, 70 deletions
diff --git a/drivers/gdisp/STM32F746Discovery/gdisp_lld_STM32F746Discovery.c b/drivers/gdisp/STM32F746Discovery/gdisp_lld_STM32F746Discovery.c
index e9b4e54b..e27264e2 100644
--- a/drivers/gdisp/STM32F746Discovery/gdisp_lld_STM32F746Discovery.c
+++ b/drivers/gdisp/STM32F746Discovery/gdisp_lld_STM32F746Discovery.c
@@ -94,71 +94,6 @@ typedef struct ltdcConfig {
/* Driver exported functions. */
/*===========================================================================*/
-static void InitController(GDisplay *g) {
- #define REG_TYPEMASK 0xFF00
- #define REG_DATAMASK 0x00FF
-
- #define REG_DATA 0x0000
- #define REG_COMMAND 0x0100
- #define REG_DELAY 0x0200
-
- static const uint16_t initdata[] = {
- REG_COMMAND | ILI9341_CMD_RESET,
- REG_DELAY | 5,
- REG_COMMAND | ILI9341_CMD_DISPLAY_OFF,
- REG_COMMAND | ILI9341_SET_FRAME_CTL_NORMAL, 0x00, 0x1B,
- REG_COMMAND | ILI9341_SET_FUNCTION_CTL, 0x0A, 0xA2,
- REG_COMMAND | ILI9341_SET_POWER_CTL_1, 0x10,
- REG_COMMAND | ILI9341_SET_POWER_CTL_2, 0x10,
- #if 1
- REG_COMMAND | ILI9341_SET_VCOM_CTL_1, 0x45, 0x15,
- REG_COMMAND | ILI9341_SET_VCOM_CTL_2, 0x90,
- #else
- REG_COMMAND | ILI9341_SET_VCOM_CTL_1, 0x35, 0x3E,
- REG_COMMAND | ILI9341_SET_VCOM_CTL_2, 0xBE,
- #endif
- REG_COMMAND | ILI9341_SET_MEM_ACS_CTL, 0xC8,
- REG_COMMAND | ILI9341_SET_RGB_IF_SIG_CTL, 0xC2,
- REG_COMMAND | ILI9341_SET_FUNCTION_CTL, 0x0A, 0xA7, 0x27, 0x04,
- REG_COMMAND | ILI9341_SET_COL_ADDR, 0x00, 0x00, 0x00, 0xEF,
- REG_COMMAND | ILI9341_SET_PAGE_ADDR, 0x00, 0x00, 0x01, 0x3F,
- REG_COMMAND | ILI9341_SET_IF_CTL, 0x01, 0x00, 0x06,
- REG_COMMAND | ILI9341_SET_GAMMA, 0x01,
- REG_COMMAND | ILI9341_SET_PGAMMA,
- #if 1
- 0x0F, 0x29, 0x24, 0x0C, 0x0E, 0x09, 0x4E, 0x78,
- 0x3C, 0x09, 0x13, 0x05, 0x17, 0x11, 0x00,
- #else
- 0x1F, 0x1a, 0x18, 0x0a, 0x0f, 0x06, 0x45, 0x87,
- 0x32, 0x0a, 0x07, 0x02, 0x07, 0x05, 0x00,
- #endif
- REG_COMMAND | ILI9341_SET_NGAMMA,
- #if 1
- 0x00, 0x16, 0x1B, 0x04, 0x11, 0x07, 0x31, 0x33,
- 0x42, 0x05, 0x0C, 0x0A, 0x28, 0x2F, 0x0F,
- #else
- 0x00, 0x25, 0x27, 0x05, 0x10, 0x09, 0x3a, 0x78,
- 0x4d, 0x05, 0x18, 0x0d, 0x38, 0x3a, 0x1f,
- #endif
- REG_COMMAND | ILI9341_CMD_SLEEP_OFF,
- REG_DELAY | 10,
- REG_COMMAND | ILI9341_CMD_DISPLAY_ON,
- REG_COMMAND | ILI9341_SET_MEM
- };
-
- const uint16_t *p;
-
- acquire_bus(g);
- for(p = initdata; p < &initdata[sizeof(initdata)/sizeof(initdata[0])]; p++) {
- switch(*p & REG_TYPEMASK) {
- case REG_DATA: write_data(g, *p); break;
- case REG_COMMAND: write_index(g, *p); break;
- case REG_DELAY: gfxSleepMilliseconds(*p & 0xFF); break;
- }
- }
- release_bus(g);
-}
-
static void LTDC_Reload(void) {
LTDC->SRCR |= LTDC_SRCR_IMR;
while (LTDC->SRCR & (LTDC_SRCR_IMR | LTDC_SRCR_VBR))
@@ -279,9 +214,6 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
init_board(g);
//((fbPriv *)g->priv)->fbi.cfg = init_board(g);
- // Initialise the ILI9341 controller
- InitController(g);
-
// Initialise the LTDC controller
LTDC_Init();
@@ -292,16 +224,17 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
// Finish Init the board
post_init_board(g);
- /* Turn on the back-light */
+ // Turn on the back-light
set_backlight(g, GDISP_INITIAL_BACKLIGHT);
- /* Initialise the GDISP structure */
+ // Initialise the GDISP structure
g->g.Width = driverCfg.bglayer.width;
g->g.Height = driverCfg.bglayer.height;
g->g.Orientation = GDISP_ROTATE_0;
g->g.Powermode = powerOn;
g->g.Backlight = GDISP_INITIAL_BACKLIGHT;
g->g.Contrast = GDISP_INITIAL_CONTRAST;
+
return TRUE;
}