Implemented TactilityKernel and DevicetreeCompiler, updated licenses & copyrights (#452)

**New features**

- Created a devicetree DTS and YAML parser in Python
- Created new modules:
  - TactilityKernel (LGPL v3.0 license)
  - Platforms/PlatformEsp32 (LGPL v3.0 license) 
  - Platforms/PlatformPosix (LGPL v3.0 license)
  - Tests/TactilityKernelTests

Most boards have a placeholder DTS file, while T-Lora Pager has a few devices attached.

**Licenses**

Clarified licenses and copyrights better.

- Add explanation about the intent behind them.
- Added explanation about licenses for past and future subprojects
- Added more details explanations with regards to the logo usage
- Copied licenses to subprojects to make it more explicit
This commit is contained in:
Ken Van Hoeylandt
2026-01-24 15:47:11 +01:00
committed by GitHub
parent 0d16eb606f
commit 4b6ed871a9
194 changed files with 7807 additions and 741 deletions
@@ -0,0 +1,45 @@
#pragma once
#include <assert.h>
#include <stdbool.h>
#include <Tactility/FreeRTOS/semphr.h>
#ifdef __cplusplus
extern "C" {
#endif
struct Mutex {
QueueHandle_t handle;
};
inline static void mutex_construct(struct Mutex* mutex) {
assert(mutex->handle == NULL);
mutex->handle = xSemaphoreCreateMutex();
}
inline static void mutex_destruct(struct Mutex* mutex) {
assert(mutex->handle != NULL);
vPortAssertIfInISR();
vSemaphoreDelete(mutex->handle);
mutex->handle = NULL;
}
inline static void mutex_lock(struct Mutex* mutex) {
xSemaphoreTake(mutex->handle, portMAX_DELAY);
}
inline static bool mutex_try_lock(struct Mutex* mutex) {
return xSemaphoreTake(mutex->handle, 0) == pdTRUE;
}
inline static bool mutex_is_locked(struct Mutex* mutex) {
return xSemaphoreGetMutexHolder(mutex->handle) != NULL;
}
inline static void mutex_unlock(struct Mutex* mutex) {
xSemaphoreGive(mutex->handle);
}
#ifdef __cplusplus
}
#endif
@@ -0,0 +1,44 @@
#pragma once
#include <stdbool.h>
#include <assert.h>
#include <Tactility/FreeRTOS/semphr.h>
#ifdef __cplusplus
extern "C" {
#endif
struct RecursiveMutex {
QueueHandle_t handle;
};
inline static void recursive_mutex_construct(struct RecursiveMutex* mutex) {
mutex->handle = xSemaphoreCreateRecursiveMutex();
}
inline static void recursive_mutex_destruct(struct RecursiveMutex* mutex) {
assert(mutex->handle != NULL);
vPortAssertIfInISR();
vSemaphoreDelete(mutex->handle);
mutex->handle = NULL;
}
inline static void recursive_mutex_lock(struct RecursiveMutex* mutex) {
xSemaphoreTakeRecursive(mutex->handle, portMAX_DELAY);
}
inline static bool recursive_mutex_is_locked(struct RecursiveMutex* mutex) {
return xSemaphoreGetMutexHolder(mutex->handle) != NULL;
}
inline static bool recursive_mutex_try_lock(struct RecursiveMutex* mutex) {
return xSemaphoreTakeRecursive(mutex->handle, 0) == pdTRUE;
}
inline static void recursive_mutex_unlock(struct RecursiveMutex* mutex) {
xSemaphoreGiveRecursive(mutex->handle);
}
#ifdef __cplusplus
}
#endif