diff --git a/examples/common/screen-framework/Display.cpp b/examples/common/screen-framework/Display.cpp index d29c3483b38a95..bd6e363b33c9ac 100644 --- a/examples/common/screen-framework/Display.cpp +++ b/examples/common/screen-framework/Display.cpp @@ -131,8 +131,7 @@ esp_err_t InitDisplay() ESP_LOGI(TAG, "Display initialized (height %u, width %u)", DisplayHeight, DisplayWidth); - // for some reason this is backwards (turns out this is because of a 2019 update to the m5stack hw) - TFT_invertDisplay(INVERT_ON); + TFT_invertDisplay(INVERT_DISPLAY); // prepare the display for brightness control SetupBrightnessControl(); diff --git a/examples/common/screen-framework/include/Display.h b/examples/common/screen-framework/include/Display.h index 408481223d879b..13fbabd5de6355 100644 --- a/examples/common/screen-framework/include/Display.h +++ b/examples/common/screen-framework/include/Display.h @@ -31,13 +31,19 @@ #if CONFIG_DEVICE_TYPE_M5STACK #define CONFIG_HAVE_DISPLAY 1 -#define CONFIG_TFT_PREDEFINED_DISPLAY_TYPE 3 +// for some reason this is backwards (turns out this is because of a 2019 update to the m5stack hw) +#define INVERT_DISPLAY INVERT_ON -#else // !CONFIG_DEVICE_TYPE_M5STACK +#elif CONFIG_DEVICE_TYPE_ESP32_WROVER_KIT + +#define CONFIG_HAVE_DISPLAY 1 +#define INVERT_DISPLAY INVERT_OFF + +#else #define CONFIG_HAVE_DISPLAY 0 -#endif // !CONFIG_DEVICE_TYPE_M5STACK +#endif #if CONFIG_HAVE_DISPLAY diff --git a/examples/wifi-echo/server/esp32/main/Kconfig.projbuild b/examples/wifi-echo/server/esp32/main/Kconfig.projbuild index 743989ba1a363f..549e8ebd594228 100644 --- a/examples/wifi-echo/server/esp32/main/Kconfig.projbuild +++ b/examples/wifi-echo/server/esp32/main/Kconfig.projbuild @@ -31,6 +31,8 @@ menu "WiFi Echo Demo" config DEVICE_TYPE_ESP32_DEVKITC bool "ESP32-DevKitC" + config DEVICE_TYPE_ESP32_WROVER_KIT + bool "ESP32-WROVER-KIT_V4.1" config DEVICE_TYPE_M5STACK bool "M5Stack" endchoice @@ -66,8 +68,9 @@ menu "WiFi Echo Demo" config TFT_PREDEFINED_DISPLAY_TYPE int range 0 5 - default 3 if DEVICE_TYPE_M5STACK default 0 if DEVICE_TYPE_ESP32_DEVKITC + default 3 if DEVICE_TYPE_M5STACK + default 4 if DEVICE_TYPE_ESP32_WROVER_KIT config RENDEZVOUS_MODE int diff --git a/examples/wifi-echo/server/esp32/main/wifi-echo.cpp b/examples/wifi-echo/server/esp32/main/wifi-echo.cpp index 2551b7f43e574b..6e7e8446586dd1 100644 --- a/examples/wifi-echo/server/esp32/main/wifi-echo.cpp +++ b/examples/wifi-echo/server/esp32/main/wifi-echo.cpp @@ -63,11 +63,12 @@ extern void startServer(); #define BUTTON_3_GPIO_NUM GPIO_NUM_37 // Right button on M5Stack #define STATUS_LED_GPIO_NUM GPIO_NUM_MAX // No status LED on M5Stack +#elif CONFIG_DEVICE_TYPE_ESP32_WROVER_KIT + +#define STATUS_LED_GPIO_NUM GPIO_NUM_26 + #elif CONFIG_DEVICE_TYPE_ESP32_DEVKITC -#define BUTTON_1_GPIO_NUM GPIO_NUM_34 // Button 1 on DevKitC -#define BUTTON_2_GPIO_NUM GPIO_NUM_35 // Button 2 on DevKitC -#define BUTTON_3_GPIO_NUM GPIO_NUM_0 // Button 3 on DevKitC #define STATUS_LED_GPIO_NUM GPIO_NUM_2 // Use LED1 (blue LED) as status LED on DevKitC #else // !CONFIG_DEVICE_TYPE_ESP32_DEVKITC @@ -79,15 +80,6 @@ extern void startServer(); // Used to indicate that an IP address has been added to the QRCode #define EXAMPLE_VENDOR_TAG_IP 1 -#if CONFIG_HAVE_DISPLAY - -// Where to draw the connection status message -#define CONNECTION_MESSAGE 75 -// Where to draw the IPv6 information -#define IPV6_INFO 85 - -#endif // CONFIG_HAVE_DISPLAY - LEDWidget statusLED1; LEDWidget statusLED2; BluetoothWidget bluetoothLED; @@ -102,9 +94,13 @@ RendezvousDeviceDelegate * rendezvousDelegate = nullptr; namespace { +#if CONFIG_DEVICE_TYPE_M5STACK + std::vector