mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 19:03:16 +00:00
Merge develop into main (#322)
- Fix crash in TactilityC - Improve MAX_TICKS implementation (and renamed to TT_MAX_TICKS)
This commit is contained in:
parent
457c21ffd8
commit
63866fb371
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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.
|
||||||
|
|||||||
@ -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;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user