Device driver implementation for the GC9A01 display controller.
More...
Device driver implementation for the GC9A01 display controller.
About
The GC9A01 is a single chip display driver for 240x240 TFT LCD displays.
The driver communicates with the device either via an
- SPI serial interface (if module
lcd_spi enabled) or an
- MCU 8080 8-/16-bit parallel interface (if module
lcd_parallel or module lcd_parallel_16 is enabled).
Usage
The driver can be configured by redefining the default parameters from the gc9a01_params.h header. For new or custom boards, the best place for this configuration is the board definition header board.h. For example, to enable the global color inversion, you can add the following line:
#define GC9A01_PARAM_INVERTED 1
For applications using the display with e.g. a development board, you can also define the parameters through CFLAGS in your application's Makefile. For example, to set the Chip Select pin, you can add the following line:
CFLAGS += -DGC9A01_PARAM_CS="GPIO_PIN(1,1)"
- Note
- The SPI pins are defined by the selected SPI controller. The default is
SPI_DEV(0). You can find the according pin definitions for the SPI controller in your board's periph_conf.h header.
After configuring the driver, it can be used with the generic LCD API (LCD display driver). See tests/drivers/gc9a01 for an example application.
- Note
- Depending on the manufacturer, some panels require inversion to be enabled in order to display the colors properly. If colors show up inverted, try enabling it via GC9A01_PARAM_INVERTED.
|
|
const lcd_driver_t | lcd_gc9a01_driver |
| | LCD device operations table.
|
| |
◆ CONFIG_GC9A01_VREG1A
| #define CONFIG_GC9A01_VREG1A (5340) |
GC9A01 VREG1A level.
Default VREG1A voltage of 5.34V. VREG1A is the highest positive grayscale reference voltage. VREG1A should be between 4.8 V and 7.34 V .
Definition at line 77 of file gc9a01.h.
◆ CONFIG_GC9A01_VREG2A
| #define CONFIG_GC9A01_VREG2A (-3980) |
GC9A01 VREG2A level.
Default VREG2A voltage of -3.98V. VREG1A is the lowest negative grayscale reference voltage. VREG2A should be between -4.2 V and -1.66 V .
Definition at line 87 of file gc9a01.h.
◆ GC9A01_ROTATION_HORZ
Horizontal mode.
Definition at line 97 of file gc9a01.h.
◆ GC9A01_ROTATION_HORZ_FLIP
| #define GC9A01_ROTATION_HORZ_FLIP |
Value:
#define LCD_MADCTL_MX
Column access order.
#define LCD_MADCTL_MY
Row address order.
#define LCD_MADCTL_MV
Row column exchange.
Horizontal flipped.
Definition at line 98 of file gc9a01.h.
◆ GC9A01_ROTATION_VERT
Vertical mode.
Definition at line 95 of file gc9a01.h.
◆ GC9A01_ROTATION_VERT_FLIP
Flipped vertical.
Definition at line 96 of file gc9a01.h.