Go to the source code of this file.
|
| FRAMEBUFFER_DEVICE *STDCALL | st77xx_framebuffer_create (SPI_DEVICE *spi, uint16_t chipselect, char *name, uint32_t rotation, uint32_t width, uint32_t height, uint32_t colstart, GPIO_INFO *rst, GPIO_INFO *dc, GPIO_INFO *bl) |
| | Create, register and allocate a new ST77XX Framebuffer device which can be accessed using the framebuffer API.
|
| uint32_t STDCALL | st77xx_framebuffer_destroy (FRAMEBUFFER_DEVICE *framebuffer) |
| | Release, deregister and destroy an ST77XX Framebuffer device created by this driver.
|
◆ ST77XX_FRAMEBUFFER_DESCRIPTION
| #define ST77XX_FRAMEBUFFER_DESCRIPTION "ST77XX TFT LCD DRIVER" |
Description of ST77XX device.
ST77XX specific constants
◆ ST77XX_SPI_RATE
| #define ST77XX_SPI_RATE 32000000 |
Default SPI clock rate.
ST77XX SPI constants
◆ ST_CMD_DELAY
| #define ST_CMD_DELAY 0x80 |
special signifier for command lists
◆ ST77XX_NOP
8.2.1. NOP: No Operation
ST77XX specific commands used in init
◆ ST77XX_SWRESET
| #define ST77XX_SWRESET 0x01 |
8.2.2. SWRESET: Software Reset
◆ ST77XX_RDDID
| #define ST77XX_RDDID 0x04 |
◆ ST77XX_RDDST
| #define ST77XX_RDDST 0x09 |
◆ ST77XX_SLPIN
| #define ST77XX_SLPIN 0x10 |
◆ ST77XX_SLPOUT
| #define ST77XX_SLPOUT 0x11 |
8.2.12. SLPOUT: Sleep Out (This command turns off sleep mode)
◆ ST77XX_PTLON
| #define ST77XX_PTLON 0x12 |
◆ ST77XX_NORON
| #define ST77XX_NORON 0x13 |
◆ ST77XX_INVOFF
| #define ST77XX_INVOFF 0x20 |
◆ ST77XX_INVON
| #define ST77XX_INVON 0x21 |
◆ ST77XX_GAMSET
| #define ST77XX_GAMSET 0x26 |
8.2.17. GAMSET: Gamma Set (This command is used to select the desired Gamma curve for the current display)
◆ ST77XX_DISPOFF
| #define ST77XX_DISPOFF 0x28 |
8.2.18. DISPOFF: Display OFF (This command is used to enter into DISPLAY OFF mode. In this mode, the output from Frame Memory is disabled and blank page inserted)
◆ ST77XX_DISPON
| #define ST77XX_DISPON 0x29 |
8.2.19. DISPON: Display ON (This command is used to recover from DISPLAY OFF mode. Output from the Frame Memory is enabled)
◆ ST77XX_CASET
| #define ST77XX_CASET 0x2A |
8.2.20. CASET: Column Address Set (This command is used to define area of frame memory where MCU can access)
◆ ST77XX_RASET
| #define ST77XX_RASET 0x2B |
8.2.21. PASET: Page Address Set (This command is used to define area of frame memory where MCU can access)
◆ ST77XX_RAMWR
| #define ST77XX_RAMWR 0x2C |
8.2.22. Memory Write (This command is used to transfer data from MCU to frame memory)
◆ ST77XX_RGBSET
| #define ST77XX_RGBSET 0x2D |
◆ ST77XX_RAMRD
| #define ST77XX_RAMRD 0x2E |
◆ ST77XX_RDDPM
| #define ST77XX_RDDPM 0x0A |
◆ ST77XX_RDD_MADCTL
| #define ST77XX_RDD_MADCTL 0x0B |
◆ ST77XX_RDD_COLMOD
| #define ST77XX_RDD_COLMOD 0x0C |
◆ ST77XX_RDDIM
| #define ST77XX_RDDIM 0x0D |
◆ ST77XX_RDDSM
| #define ST77XX_RDDSM 0x0E |
◆ ST77XX_RDDSR
| #define ST77XX_RDDSR 0x0F |
◆ ST77XX_PTLAR
| #define ST77XX_PTLAR 0x30 |
◆ ST77XX_VSCRDEF
| #define ST77XX_VSCRDEF 0x33 |
◆ ST77XX_TEOFF
| #define ST77XX_TEOFF 0x34 |
◆ ST77XX_TEON
◆ ST77XX_MADCTL
| #define ST77XX_MADCTL 0x36 |
8.2.29. MADCTL: Memory Access Control (This command defines read/write scanning direction of frame memory)
◆ ST77XX_IDMOFF
| #define ST77XX_IDMOFF 0x38 |
◆ ST77XX_IDMON
| #define ST77XX_IDMON 0x39 |
◆ ST77XX_RAMWRC
| #define ST77XX_RAMWRC 0x3C |
◆ ST77XX_RAMRDC
| #define ST77XX_RAMRDC 0x3E |
◆ ST77XX_COLMOD
| #define ST77XX_COLMOD 0x3A |
8.2.33. COLMOD: Pixel Format Set (This command sets the pixel format for the RGB image data used by the interface)
◆ ST77XX_MADCTL_MY
| #define ST77XX_MADCTL_MY 0x80 |
Row Address Order.
ST77XX Memory access control constants (See ST77XX datasheet 8.2.29. Memory Access Control)
◆ ST77XX_MADCTL_MX
| #define ST77XX_MADCTL_MX 0x40 |
◆ ST77XX_MADCTL_MV
| #define ST77XX_MADCTL_MV 0x20 |
◆ ST77XX_MADCTL_ML
| #define ST77XX_MADCTL_ML 0x10 |
◆ ST77XX_MADCTL_MH
| #define ST77XX_MADCTL_MH 0x04 |
Horizontal Refresh Order.
◆ ST77XX_MADCTL_RGB
| #define ST77XX_MADCTL_RGB 0x00 |
Colour selector switch control(0=RGB colour filter panel, 1=BGR colour filter panel).
◆ ST77XX_MADCTL_BGR
| #define ST77XX_MADCTL_BGR 0x08 |
◆ ST77XX_RAMCTRL
| #define ST77XX_RAMCTRL 0xB0 |
◆ ST77XX_RGBCTRL
| #define ST77XX_RGBCTRL 0xB1 |
◆ ST77XX_PORCTRL
| #define ST77XX_PORCTRL 0xB2 |
◆ ST77XX_FRCTR1
| #define ST77XX_FRCTR1 0xB3 |
8.3.2. FRCTR1: Frame Rate Control (In Normal Mode/Full Colors)
◆ ST77XX_PARCTRL
| #define ST77XX_PARCTRL 0xB5 |
◆ ST77XX_GCTRL
| #define ST77XX_GCTRL 0xB7 |
◆ ST77XX_GTADJ
| #define ST77XX_GTADJ 0xB8 |
◆ ST77XX_DGMEN
| #define ST77XX_DGMEN 0xBA |
◆ ST77XX_VCOMS
| #define ST77XX_VCOMS 0xBB |
◆ ST77XX_DISCTRL
| #define ST77XX_DISCTRL 0xB6 |
8.3.7. DISCTRL: Display Function Control
◆ ST77XX_LCMCTRL
| #define ST77XX_LCMCTRL 0xC0 |
◆ ST77XX_IDSET
| #define ST77XX_IDSET 0xC1 |
◆ ST77XX_VDVVRHEN
| #define ST77XX_VDVVRHEN 0xC2 |
◆ ST77XX_VRHS
◆ ST77XX_VDVSET
| #define ST77XX_VDVSET 0xC4 |
◆ ST77XX_VCMOFSET
| #define ST77XX_VCMOFSET 0xC5 |
◆ ST77XX_FRCTR2
| #define ST77XX_FRCTR2 0xC6 |
◆ ST77XX_CABCCTRL
| #define ST77XX_CABCCTRL 0xC7 |
◆ ST77XX_REGSEL1
| #define ST77XX_REGSEL1 0xC8 |
◆ ST77XX_REGSEL2
| #define ST77XX_REGSEL2 0xCA |
◆ ST77XX_PWMFRSEL
| #define ST77XX_PWMFRSEL 0xCC |
◆ ST77XX_PWCTRL1
| #define ST77XX_PWCTRL1 0xD0 |
8.3.16. PWCTRL1: Power Control 1
◆ ST77XX_VAPVANEN
| #define ST77XX_VAPVANEN 0xD2 |
◆ ST77XX_CMD2EN
| #define ST77XX_CMD2EN 0xDF |
◆ ST77XX_VMCTRL1
| #define ST77XX_VMCTRL1 0xC5 |
8.3.21. VMCTRL1: VCOM Control 1
◆ ST77XX_VMCTRL2
| #define ST77XX_VMCTRL2 0xC7 |
8.3.22. VMCTRL2: VCOM Control 2
◆ ST77XX_PGAMCTRL
| #define ST77XX_PGAMCTRL 0xE0 |
◆ ST77XX_NGAMCTRL
| #define ST77XX_NGAMCTRL 0xE1 |
◆ ST77XX_DGMLUTR
| #define ST77XX_DGMLUTR 0xE2 |
◆ ST77XX_DGMLUTB
| #define ST77XX_DGMLUTB 0xE3 |
◆ ST77XX_GATECTRL
| #define ST77XX_GATECTRL 0xE4 |
◆ ST77XX_SPI2EN
| #define ST77XX_SPI2EN 0xE7 |
◆ ST77XX_PWCTRL2
| #define ST77XX_PWCTRL2 0xE8 |
◆ ST77XX_EQCTRL
| #define ST77XX_EQCTRL 0xE9 |
◆ ST77XX_PROMCTRL
| #define ST77XX_PROMCTRL 0xEC |
◆ ST77XX_PROMEN
| #define ST77XX_PROMEN 0xFA |
◆ ST77XX_NVMSET
| #define ST77XX_NVMSET 0xFC |
◆ ST77XX_PROMACT
| #define ST77XX_PROMACT 0xFE |
◆ ST77XX_COLOR_MODE_16bit
| #define ST77XX_COLOR_MODE_16bit 0x55 |
◆ ST77XX_COLOR_MODE_18bit
| #define ST77XX_COLOR_MODE_18bit 0x66 |
◆ ST77XX_FRAMEBUFFER
◆ st77xx_framebuffer_create()
Create, register and allocate a new ST77XX Framebuffer device which can be accessed using the framebuffer API.
ST77XX Functions
- Parameters
-
| SPI | The SPI device that this ST77XX is connected to |
| ChipSelect | The SPI chip select to use when communicating with this device |
| Name | The text description of this device which will show in the device list (Optional) |
| Rotation | The rotation value for the framebuffer device (eg FRAMEBUFFER_ROTATION_180) |
| Width | The width of the framebuffer in pixels |
| Height | The height of the framebuffer in pixels |
| RST | GPIO pin information for the Reset pin (Optional) |
| DC | GPIO pin information for the Data/Command pin |
| BL | GPIO pin information for the Backlight pin (Optional) |
- Returns
- Pointer to the new Framebuffer device or nil if the framebuffer device could not be created
◆ st77xx_framebuffer_destroy()
Release, deregister and destroy an ST77XX Framebuffer device created by this driver.
- Parameters
-
| Framebuffer | The Framebuffer device to destroy |
- Returns
- ERROR_SUCCESS if completed or another error code on failure