Various improvements (#32)
- Set DPI for Waveshare S3 board - Cleanup whitespace in test - Replace FreeRTOS semaphore in `Loader` to `Mutex`
This commit is contained in:
parent
4f89918e91
commit
69165263f1
@ -1,9 +1,7 @@
|
|||||||
# TODOs
|
# TODOs
|
||||||
- Update `view_port` to use `ViewPort` as handle externally and `ViewPortData` internally
|
- Update `view_port` to use `ViewPort` as handle externally and `ViewPortData` internally
|
||||||
- Replace FreeRTOS semaphore from `Loader` with internal `Mutex`
|
|
||||||
- Create more unit tests for `tactility-core` and `tactility` (PC-only for now)
|
- Create more unit tests for `tactility-core` and `tactility` (PC-only for now)
|
||||||
- Have a way to deinit LVGL drivers that are created from `HardwareConfig`
|
- Have a way to deinit LVGL drivers that are created from `HardwareConfig`
|
||||||
- Set DPI in sdkconfig for Waveshare display
|
|
||||||
- Show a warning screen if firmware encryption or secure boot are off when saving WiFi credentials.
|
- Show a warning screen if firmware encryption or secure boot are off when saving WiFi credentials.
|
||||||
- Show a warning screen when a user plugs in the SD card on a device that only supports mounting at boot.
|
- Show a warning screen when a user plugs in the SD card on a device that only supports mounting at boot.
|
||||||
- Try out Waveshare S3 120MHz mode for PSRAM (see "enabling 120M PSRAM is necessary" in [docs](https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3#Other_Notes))
|
- Try out Waveshare S3 120MHz mode for PSRAM (see "enabling 120M PSRAM is necessary" in [docs](https://www.waveshare.com/wiki/ESP32-S3-Touch-LCD-4.3#Other_Notes))
|
||||||
|
|||||||
@ -28,4 +28,4 @@ CONFIG_SPIRAM_SPEED_80M=y
|
|||||||
CONFIG_LV_COLOR_16_SWAP=n
|
CONFIG_LV_COLOR_16_SWAP=n
|
||||||
CONFIG_LV_DISP_DEF_REFR_PERIOD=17
|
CONFIG_LV_DISP_DEF_REFR_PERIOD=17
|
||||||
CONFIG_LV_INDEV_DEF_READ_PERIOD=17
|
CONFIG_LV_INDEV_DEF_READ_PERIOD=17
|
||||||
CONFIG_LV_DPI_DEF=139
|
CONFIG_LV_DPI_DEF=216
|
||||||
|
|||||||
@ -33,7 +33,7 @@ static Loader* loader_alloc() {
|
|||||||
&loader_main,
|
&loader_main,
|
||||||
NULL
|
NULL
|
||||||
);
|
);
|
||||||
loader_singleton->mutex = xSemaphoreCreateRecursiveMutex();
|
loader_singleton->mutex = tt_mutex_alloc(MutexTypeRecursive);
|
||||||
loader_singleton->app_stack_index = -1;
|
loader_singleton->app_stack_index = -1;
|
||||||
memset(loader_singleton->app_stack, 0, sizeof(App) * APP_STACK_SIZE);
|
memset(loader_singleton->app_stack, 0, sizeof(App) * APP_STACK_SIZE);
|
||||||
return loader_singleton;
|
return loader_singleton;
|
||||||
@ -51,13 +51,13 @@ static void loader_free() {
|
|||||||
void loader_lock() {
|
void loader_lock() {
|
||||||
tt_assert(loader_singleton);
|
tt_assert(loader_singleton);
|
||||||
tt_assert(loader_singleton->mutex);
|
tt_assert(loader_singleton->mutex);
|
||||||
tt_check(xSemaphoreTakeRecursive(loader_singleton->mutex, portMAX_DELAY) == pdPASS);
|
tt_check(tt_mutex_acquire(loader_singleton->mutex, TtWaitForever) == TtStatusOk);
|
||||||
}
|
}
|
||||||
|
|
||||||
void loader_unlock() {
|
void loader_unlock() {
|
||||||
tt_assert(loader_singleton);
|
tt_assert(loader_singleton);
|
||||||
tt_assert(loader_singleton->mutex);
|
tt_assert(loader_singleton->mutex);
|
||||||
tt_check(xSemaphoreGiveRecursive(loader_singleton->mutex) == pdPASS);
|
tt_check(tt_mutex_release(loader_singleton->mutex) == TtStatusOk);
|
||||||
}
|
}
|
||||||
|
|
||||||
LoaderStatus loader_start_app(const char* id, bool blocking, Bundle* _Nullable bundle) {
|
LoaderStatus loader_start_app(const char* id, bool blocking, Bundle* _Nullable bundle) {
|
||||||
|
|||||||
@ -22,8 +22,7 @@ struct Loader {
|
|||||||
Thread* thread;
|
Thread* thread;
|
||||||
PubSub* pubsub;
|
PubSub* pubsub;
|
||||||
MessageQueue* queue;
|
MessageQueue* queue;
|
||||||
// TODO: replace with Mutex
|
Mutex mutex;
|
||||||
SemaphoreHandle_t mutex;
|
|
||||||
int8_t app_stack_index;
|
int8_t app_stack_index;
|
||||||
App app_stack[APP_STACK_SIZE];
|
App app_stack[APP_STACK_SIZE];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -2,7 +2,6 @@
|
|||||||
#include "tactility_core.h"
|
#include "tactility_core.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
|
||||||
|
|
||||||
void* timer_callback_context = NULL;
|
void* timer_callback_context = NULL;
|
||||||
static void timer_callback_with_context(void* context) {
|
static void timer_callback_with_context(void* context) {
|
||||||
timer_callback_context = context;
|
timer_callback_context = context;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user