Created
March 26, 2019 11:53
-
-
Save maciekmm/26911509b706b32a587db78c0bb12efb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void lcd_start(void) | |
{ | |
/* LCD Initialization */ | |
BSP_LCD_Init(); | |
/* LCD Initialization */ | |
BSP_LCD_LayerDefaultInit(0, (unsigned int)lcd_image_bg); | |
BSP_LCD_LayerDefaultInit(1, (unsigned int)lcd_image_fg); | |
/* Enable the LCD */ | |
BSP_LCD_DisplayOn(); | |
/* Select the LCD Background Layer */ | |
BSP_LCD_SelectLayer(0); | |
/* Clear the Background Layer */ | |
BSP_LCD_Clear(LCD_COLOR_BLACK); | |
BSP_LCD_SetBackColor(LCD_COLOR_BLACK); | |
BSP_LCD_SetColorKeying(1,LCD_COLOR_BLACK); | |
/* Select the LCD Foreground Layer */ | |
BSP_LCD_SelectLayer(1); | |
/* Clear the Foreground Layer */ | |
BSP_LCD_Clear(LCD_COLOR_BLACK); | |
BSP_LCD_SetBackColor(LCD_COLOR_BLACK); | |
/* Configure the transparency for foreground and background : | |
Increase the transparency */ | |
BSP_LCD_SetTransparency(0, 255); | |
//BSP_LCD_SetTransparency(1, 100); | |
BSP_LCD_SetTransparency(1, 255); | |
} | |
int initialize_touchscreen(void) | |
{ | |
uint8_t status = 0; | |
status = BSP_TS_Init(BSP_LCD_GetXSize(), BSP_LCD_GetYSize()); | |
if(status != TS_OK) return -1; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment