Merge develop into main (#322)

- Fix crash in TactilityC
- Improve MAX_TICKS implementation (and renamed to TT_MAX_TICKS)
This commit is contained in:
Ken Van Hoeylandt 2025-09-06 18:43:11 +02:00 committed by GitHub
parent 457c21ffd8
commit 63866fb371
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 4 additions and 4 deletions

View File

@ -22,7 +22,7 @@ public:
tt_hal_display_driver_free(handle); tt_hal_display_driver_free(handle);
} }
bool lock(TickType timeout = MAX_TICKS) const { bool lock(TickType timeout = TT_MAX_TICKS) const {
return tt_hal_display_driver_lock(handle, timeout); return tt_hal_display_driver_lock(handle, timeout);
} }

View File

@ -8,7 +8,7 @@ extern "C" {
typedef unsigned long TickType; typedef unsigned long TickType;
#define MAX_TICKS INT32_MAX #define TT_MAX_TICKS ((TickType)(~(TickType)0))
/** /**
* Stall the current task for the specified amount of time. * Stall the current task for the specified amount of time.

View File

@ -41,7 +41,7 @@ void tt_app_get_data_directory(AppPathsHandle handle, char* buffer, size_t* size
auto data_path = paths->getDataDirectory(); auto data_path = paths->getDataDirectory();
auto expected_length = data_path.length() + 1; auto expected_length = data_path.length() + 1;
if (*size < expected_length) { if (*size < expected_length) {
TT_LOG_E(TAG, "Path buffer not large enough (%d < %d)", size, expected_length); TT_LOG_E(TAG, "Path buffer not large enough (%d < %d)", *size, expected_length);
*size = 0; *size = 0;
buffer[0] = 0; buffer[0] = 0;
return; return;
@ -59,7 +59,7 @@ void tt_app_get_data_directory_lvgl(AppPathsHandle handle, char* buffer, size_t*
auto data_path = paths->getDataDirectoryLvgl(); auto data_path = paths->getDataDirectoryLvgl();
auto expected_length = data_path.length() + 1; auto expected_length = data_path.length() + 1;
if (*size < expected_length) { if (*size < expected_length) {
TT_LOG_E(TAG, "Path buffer not large enough (%d < %d)", size, expected_length); TT_LOG_E(TAG, "Path buffer not large enough (%d < %d)", *size, expected_length);
*size = 0; *size = 0;
buffer[0] = 0; buffer[0] = 0;
return; return;