...
The display driver implements the following C-binding API:
Function | Description | Comments |
uint8_t BSP_LCD_Init(void);
| Initialise LCD and backlight | |
uint8_t BSP_LCD_DeInit(void);
| De-initialise LCD and backlight | |
uint32_t BSP_LCD_GetXSize(void);
| Return LCD width in pixels | |
uint32_t BSP_LCD_GetYSize(void);
| Return LCD height in pixels | |
void BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FrameBuffer);
| Set frame buffer address of layer LayerIndex | |
void BSP_LCD_SelectLayer(uint32_t LayerIndex);
| Activate layer LayerIndex | |
void BSP_LCD_Clear(uint32_t Color);
| Fill frame buffer with color Color | |
void BSP_LCD_DisplayOn(void);
| Turn LCD on | |
void BSP_LCD_DisplayOff(void);
| Turn LCD off | |
void BSP_LCD_SetBrightness(uint8_t BrightnessValue);
| Set LCD brightness | BrightnessValue is from 0 (dimmest) to 100 (brightest)
|
1.3. LCD CLI Command
The FreeRTOS application implements the following display related CLI command:
...
Function | Description | Comments |
---|
ts_goodix_handler * ts_goodix_init(uint8_t bus, uint8_t i2c_addr, uint16_t max_width, uint16_t max_height, GPIO_TypeDef * port, uint32_t pin)
|
| Initialiae Initialize the I2C touch controller | bus is the I2C bus of the I2C touch controller; i2c_addr is the I2C address of the I2C touch controller on the specified I2C bus; max_width is a max width resolution of the touch screen; max_height is a max height resolution of the touch screen; port is the GPIO port which specify an interrupt of the I2C touch controller; pin is the GPIO pin which specify an interrupt of the I2C touch controller; returns the I2C touch controller handle or 0 in case of error
|
int ts_goodix_read_input(ts_goodix_handler * hts, uint16_t * x, uint16_t * y)
|
| Read data from the I2C touch controller | hts is the I2C touch controller handle; x is coordinates along the X-axis; y coordinates along the Y-axis; returns number of touches in case if the value is from 1 to 5 otherwise operation error (need to rerun the operation)
|
...