aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gdisp/STM32F429iDiscovery/board_STM32F429iDiscovery_template.h
blob: e13af4b3fcf1cc99c2db7f6f07a517f965775702 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
 * This file is subject to the terms of the GFX License. If a copy of
 * the license was not distributed with this file, you can obtain one at:
 *
 *              http://ugfx.org/license.html
 */

#ifndef _GDISP_LLD_BOARD_H
#define _GDISP_LLD_BOARD_H

static const ltdcConfig driverCfg = {
	240, 320,
	10, 2,
	20, 2,
	10, 4,
	0,
	0x000000,
	{
		(LLDCOLOR_TYPE *)SDRAM_BANK_ADDR,	// frame
		240, 320,							// width, height
		240 * LTDC_PIXELBYTES,				// pitch
		LTDC_PIXELFORMAT,					// fmt
		0, 0,								// x, y
		240, 320,							// cx, cy
		LTDC_COLOR_FUCHSIA,					// defcolor
		0x980088,							// keycolor
		LTDC_BLEND_FIX1_FIX2,				// blending
		0,									// palette
		0,									// palettelen
		0xFF,								// alpha
		LTDC_LEF_ENABLE						// flags
	},
	LTDC_UNUSED_LAYER_CONFIG
};

static GFXINLINE void init_board(GDisplay *g) {

	// As we are not using multiple displays we set g->board to NULL as we don't use it.
	g->board = 0;

	switch(g->controllerdisplay) {
	case 0:											// Set up for Display 0
		// Your init here
		break;
	}
}

static GFXINLINE void post_init_board(GDisplay *g) {
}

static GFXINLINE void set_backlight(GDisplay *g, uint8_t percent) {
}

static GFXINLINE void acquire_bus(GDisplay *g) {
}

static GFXINLINE void release_bus(GDisplay *g) {
}

static GFXINLINE void write_index(GDisplay *g, uint8_t index) {
}

static GFXINLINE void write_data(GDisplay *g, uint8_t data) {
}

#endif /* _GDISP_LLD_BOARD_H */