Merge pull request #96 from lvgl/feature/build-all-drivers
Build all display drivers
This commit is contained in:
commit
280bebf52e
12 changed files with 90 additions and 92 deletions
|
@ -189,7 +189,7 @@ static void st7796s_send_color(void *data, uint16_t length)
|
|||
|
||||
static void st7796s_set_orientation(uint8_t orientation)
|
||||
{
|
||||
// ESP_ASSERT(orientation < 4);
|
||||
assert(orientation < 4);
|
||||
|
||||
const char *orientation_str[] = {
|
||||
"PORTRAIT", "PORTRAIT_INVERTED", "LANDSCAPE", "LANDSCAPE_INVERTED"};
|
||||
|
@ -197,16 +197,16 @@ static void st7796s_set_orientation(uint8_t orientation)
|
|||
ESP_LOGI(TAG, "Display orientation: %s", orientation_str[orientation]);
|
||||
|
||||
#if defined CONFIG_LV_PREDEFINED_DISPLAY_M5STACK
|
||||
uint8_t data[] = {0x68, 0x68, 0x08, 0x08};
|
||||
const uint8_t data[] = {0x68, 0x68, 0x08, 0x08};
|
||||
#elif defined(CONFIG_LV_PREDEFINED_DISPLAY_WROVER4)
|
||||
uint8_t data[] = {0x4C, 0x88, 0x28, 0xE8};
|
||||
const uint8_t data[] = {0x4C, 0x88, 0x28, 0xE8};
|
||||
#elif defined(CONFIG_LV_PREDEFINED_DISPLAY_WT32_SC01)
|
||||
uint8_t data[] = {0x48, 0x88, 0x28, 0xE8};
|
||||
#elif defined(CONFIG_LV_PREDEFINED_DISPLAY_NONE)
|
||||
uint8_t data[] = {0x48, 0x88, 0x28, 0xE8};
|
||||
const uint8_t data[] = {0x48, 0x88, 0x28, 0xE8};
|
||||
#else
|
||||
const uint8_t data[] = {0x48, 0x88, 0x28, 0xE8};
|
||||
#endif
|
||||
|
||||
ESP_LOGI(TAG, "0x36 command value: 0x%02X", data[orientation]);
|
||||
ESP_LOGD(TAG, "0x36 command value: 0x%02X", data[orientation]);
|
||||
|
||||
st7796s_send_cmd(0x36);
|
||||
st7796s_send_data((void *)&data[orientation], 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue