move LVGL framebuffer into PSRAM
This commit is contained in:
@@ -14,6 +14,7 @@ board = ttgo-t-watch
|
|||||||
framework = arduino
|
framework = arduino
|
||||||
board_build.f_flash = 80000000L
|
board_build.f_flash = 80000000L
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
|
monitor_filters = default, esp32_exception_decoder
|
||||||
build_flags =
|
build_flags =
|
||||||
; -DCORE_DEBUG_LEVEL=3
|
; -DCORE_DEBUG_LEVEL=3
|
||||||
-DBOARD_HAS_PSRAM
|
-DBOARD_HAS_PSRAM
|
||||||
@@ -25,5 +26,4 @@ lib_deps =
|
|||||||
ESP Async WebServer@>=1.2.0
|
ESP Async WebServer@>=1.2.0
|
||||||
AsyncTCP@>=1.1.1
|
AsyncTCP@>=1.1.1
|
||||||
ArduinoJson@>=6.15.2
|
ArduinoJson@>=6.15.2
|
||||||
ESP32SSPD@>=1.1.0
|
ESP32SSPD@>=1.1.0
|
||||||
;monitor_filters= default, esp32_exception_decoder
|
|
||||||
@@ -26,11 +26,12 @@
|
|||||||
|
|
||||||
#define LILYGO_WATCH_2020_V1 //To use T-Watch2020, please uncomment this line
|
#define LILYGO_WATCH_2020_V1 //To use T-Watch2020, please uncomment this line
|
||||||
#define LILYGO_WATCH_LVGL //To use LVGL, you need to enable the macro LVGL
|
#define LILYGO_WATCH_LVGL //To use LVGL, you need to enable the macro LVGL
|
||||||
|
#define TWATCH_USE_PSRAM_ALLOC_LVGL
|
||||||
#include <LilyGoWatch.h>
|
#include <LilyGoWatch.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* firmeware version string
|
* firmeware version string
|
||||||
*/
|
*/
|
||||||
#define __FIRMWARE__ "2020080702"
|
#define __FIRMWARE__ "2020081001"
|
||||||
|
|
||||||
#endif // _CONFIG_H
|
#endif // _CONFIG_H
|
||||||
|
|||||||
@@ -114,7 +114,6 @@ void IRAM_ATTR bma_irq( void ) {
|
|||||||
{
|
{
|
||||||
portYIELD_FROM_ISR ();
|
portYIELD_FROM_ISR ();
|
||||||
}
|
}
|
||||||
setCpuFrequencyMhz( 240 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -125,7 +124,9 @@ void bma_loop( TTGOClass *ttgo ) {
|
|||||||
* handle IRQ event
|
* handle IRQ event
|
||||||
*/
|
*/
|
||||||
if ( xEventGroupGetBitsFromISR( bma_event_handle ) & BMA_EVENT_INT ) {
|
if ( xEventGroupGetBitsFromISR( bma_event_handle ) & BMA_EVENT_INT ) {
|
||||||
while( !ttgo->bma->readInterrupt() );
|
setCpuFrequencyMhz(240);
|
||||||
|
|
||||||
|
while( !ttgo->bma->readInterrupt() );
|
||||||
if ( ttgo->bma->isDoubleClick() ) {
|
if ( ttgo->bma->isDoubleClick() ) {
|
||||||
powermgm_set_event( POWERMGM_BMA_WAKEUP );
|
powermgm_set_event( POWERMGM_BMA_WAKEUP );
|
||||||
xEventGroupClearBitsFromISR( bma_event_handle, BMA_EVENT_INT );
|
xEventGroupClearBitsFromISR( bma_event_handle, BMA_EVENT_INT );
|
||||||
|
|||||||
@@ -83,16 +83,26 @@ void powermgm_loop( TTGOClass *ttgo ) {
|
|||||||
display_wakeup();
|
display_wakeup();
|
||||||
|
|
||||||
timesyncToSystem();
|
timesyncToSystem();
|
||||||
ttgo->startLvglTick();
|
|
||||||
lv_disp_trig_activity(NULL);
|
|
||||||
|
|
||||||
wifictl_wakeup();
|
wifictl_wakeup();
|
||||||
|
Serial.printf("Total heap: %d\r\n", ESP.getHeapSize());
|
||||||
|
Serial.printf("Free heap: %d\r\n", ESP.getFreeHeap());
|
||||||
|
Serial.printf("Total PSRAM: %d\r\n", ESP.getPsramSize());
|
||||||
|
Serial.printf("Free PSRAM: %d\r\n", ESP.getFreePsram());
|
||||||
|
|
||||||
|
ttgo->startLvglTick();
|
||||||
|
lv_disp_trig_activity(NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
ttgo->stopLvglTick();
|
||||||
|
|
||||||
|
Serial.printf("Total heap: %d\r\n", ESP.getHeapSize());
|
||||||
|
Serial.printf("Free heap: %d\r\n", ESP.getFreeHeap());
|
||||||
|
Serial.printf("Total PSRAM: %d\r\n", ESP.getPsramSize());
|
||||||
|
Serial.printf("Free PSRAM: %d\r\n", ESP.getFreePsram());
|
||||||
display_standby();
|
display_standby();
|
||||||
mainbar_jump_to_maintile( LV_ANIM_OFF );
|
mainbar_jump_to_maintile( LV_ANIM_OFF );
|
||||||
|
|
||||||
ttgo->stopLvglTick();
|
|
||||||
timesyncToRTC();
|
timesyncToRTC();
|
||||||
|
|
||||||
bma_standby();
|
bma_standby();
|
||||||
|
|||||||
Binary file not shown.
@@ -1 +1 @@
|
|||||||
{"version":"2020080702","host":"http://www.neo-guerillaz.de","file":"ttgo-t-watch2020_v1.ino.bin"}
|
{"version":"2020081001","host":"http://www.neo-guerillaz.de","file":"ttgo-t-watch2020_v1.ino.bin"}
|
||||||
|
|||||||
Reference in New Issue
Block a user