Added Lilygo T-Deck support & more (#4)

* added lilygo t-deck

restructured boards
implemented HardwareConfig
implemented lilygo t-deck lcd and touch drivers
added sdkconfig defaults for supported boards

* cleanup

* added esp32s3 job

* build job names updated

* wip

* partial revert

* update readme and build.yml

* updated build.yaml with fix for quotes

* use esp-idf 5.1.2

* improvements and fixes

* fixes for display code

* made config const

* various improvements
This commit is contained in:
Ken Van Hoeylandt
2024-01-05 17:01:39 +01:00
committed by GitHub
parent eed990217f
commit 8336316133
53 changed files with 747 additions and 551 deletions
-5
View File
@@ -63,11 +63,6 @@ typedef struct {
* Non-blocking method to create the GUI
*/
const AppOnShow _Nullable on_show;
/**
* Callstack size. If you get a stackoverflow, then consider increasing this value.
*/
const AppStackSize stack_size;
} AppManifest;
#ifdef __cplusplus
+2 -2
View File
@@ -65,7 +65,7 @@ FURI_NORETURN void __furi_halt_implementation();
do { \
if (!(__e)) { \
ESP_LOGE("check", "%s", #__e); \
__furi_crash(__m); \
__furi_crash(#__m); \
} \
} while (0)
@@ -83,7 +83,7 @@ FURI_NORETURN void __furi_halt_implementation();
do { \
if (!(__e)) { \
ESP_LOGE("assert", "%s", #__e); \
__furi_crash(__m); \
__furi_crash(#__m); \
} \
} while (0)
#else
+5 -1
View File
@@ -116,7 +116,11 @@ uint32_t furi_event_flag_wait(
}
rflags = xEventGroupWaitBits(
hEventGroup, (EventBits_t)flags, exit_clr, wait_all, (TickType_t)timeout
hEventGroup,
(EventBits_t)flags,
exit_clr,
wait_all,
(TickType_t)timeout
);
if (options & FuriFlagWaitAll) {
+1 -5
View File
@@ -1,12 +1,8 @@
/**
* @file kernel.h
* Furi Kernel primitives
*/
#pragma once
#include "furi_core_types.h"
#define configTICK_RATE_HZ_RAW 1000
#define configTICK_RATE_HZ_RAW CONFIG_FREERTOS_HZ
#ifdef __cplusplus
extern "C" {
+2 -1
View File
@@ -13,13 +13,14 @@ LIST_DEF(FuriPubSubSubscriptionList, FuriPubSubSubscription, M_POD_OPLIST);
struct FuriPubSub {
FuriPubSubSubscriptionList_t items;
// TODO: replace recursive mutex with semaphore
FuriMutex* mutex;
};
FuriPubSub* furi_pubsub_alloc() {
FuriPubSub* pubsub = malloc(sizeof(FuriPubSub));
pubsub->mutex = furi_mutex_alloc(FuriMutexTypeNormal);
pubsub->mutex = furi_mutex_alloc(FuriMutexTypeRecursive);
furi_assert(pubsub->mutex);
FuriPubSubSubscriptionList_init(pubsub->items);
+6 -1
View File
@@ -4,6 +4,9 @@
#include "mutex.h"
#include "m-dict.h"
#include "m_cstr_dup.h"
#include "log.h"
#define TAG "record"
#define FURI_RECORD_FLAG_READY (0x1)
@@ -37,7 +40,7 @@ static void furi_record_erase(const char* name, FuriRecordData* record_data) {
void furi_record_init() {
furi_record = malloc(sizeof(FuriRecord));
furi_record->mutex = furi_mutex_alloc(FuriMutexTypeNormal);
furi_record->mutex = furi_mutex_alloc(FuriMutexTypeRecursive);
furi_check(furi_record->mutex);
FuriRecordDataDict_init(furi_record->records);
}
@@ -111,6 +114,7 @@ bool furi_record_destroy(const char* name) {
}
void* furi_record_open(const char* name) {
furi_assert(name);
furi_assert(furi_record);
furi_record_lock();
@@ -134,6 +138,7 @@ void* furi_record_open(const char* name) {
}
void furi_record_close(const char* name) {
furi_assert(name);
furi_assert(furi_record);
furi_record_lock();
+7 -7
View File
@@ -51,7 +51,7 @@ struct FuriThread {
// Keep all non-alignable byte types in one place,
// this ensures that the size of this structure is minimal
bool is_service;
bool is_static;
bool heap_trace_enabled;
configSTACK_DEPTH_TYPE stack_size;
@@ -113,7 +113,7 @@ static void furi_thread_body(void* context) {
furi_assert(thread->state == FuriThreadStateRunning);
if (thread->is_service) {
if (thread->is_static) {
ESP_LOGI(
TAG,
"%s service thread TCB memory will not be reclaimed",
@@ -135,7 +135,7 @@ FuriThread* furi_thread_alloc() {
// TODO: create default struct instead of using memset()
memset(thread, 0, sizeof(FuriThread));
thread->output.buffer = furi_string_alloc();
thread->is_service = false;
thread->is_static = false;
FuriThread* parent = NULL;
if (xTaskGetSchedulerState() != taskSCHEDULER_NOT_STARTED) {
@@ -207,8 +207,8 @@ void furi_thread_set_appid(FuriThread* thread, const char* appid) {
thread->appid = appid ? strdup(appid) : NULL;
}
void furi_thread_mark_as_service(FuriThread* thread) {
thread->is_service = true;
void furi_thread_mark_as_static(FuriThread* thread) {
thread->is_static = true;
}
bool furi_thread_mark_is_service(FuriThreadId thread_id) {
@@ -216,7 +216,7 @@ bool furi_thread_mark_is_service(FuriThreadId thread_id) {
assert(!FURI_IS_IRQ_MODE() && (hTask != NULL));
FuriThread* thread = (FuriThread*)pvTaskGetThreadLocalStoragePointer(hTask, 0);
assert(thread != NULL);
return thread->is_service;
return thread->is_static;
}
void furi_thread_set_stack_size(FuriThread* thread, size_t stack_size) {
@@ -281,7 +281,7 @@ void furi_thread_start(FuriThread* thread) {
uint32_t stack = thread->stack_size / sizeof(StackType_t);
UBaseType_t priority = thread->priority ? thread->priority : FuriThreadPriorityNormal;
if (thread->is_service) {
if (thread->is_static) {
thread->task_handle = xTaskCreateStatic(
furi_thread_body,
thread->name,
+1 -1
View File
@@ -109,7 +109,7 @@ void furi_thread_set_appid(FuriThread* thread, const char* appid);
*
* @param thread
*/
void furi_thread_mark_as_service(FuriThread* thread);
void furi_thread_mark_as_static(FuriThread* thread);
/** Set FuriThread stack size
*