Make screen work at 480x320 as well as 320x240

This commit is contained in:
Pim van Pelt
2017-12-07 01:28:27 +01:00
parent 7c3f699275
commit 7ba19c8372
2 changed files with 7 additions and 2 deletions

View File

@ -44,10 +44,10 @@ static void touch_handler(struct mgos_stmpe610_event_data *ed) {
void tft_demo(void)
{
mgos_ili9341_set_dimensions(mgos_sys_config_get_tft_width(), mgos_sys_config_get_tft_height());
mgos_ili9341_set_rotation(mgos_sys_config_get_tft_orientation());
mgos_stmpe610_set_rotation(mgos_sys_config_get_tft_orientation());
mgos_stmpe610_set_handler(touch_handler);
mgos_stmpe610_set_dimensions(320, 240);
mgos_stmpe610_set_dimensions(mgos_ili9341_get_screenWidth(), mgos_ili9341_get_screenHeight());
mgos_ili9341_set_fgcolor(0,0,0);
mgos_ili9341_fillScreen();