* SdCard HAL refactored (#135) - Refactor SdCard HAL - introduce Lockable * Screenshot and FatFS improvements (#136) - Fix screenshots on ESP32 - Improve Screenshot service - Convert Screenshot app to class-based instead of structs - Screenshot app now automatically updates when task is finished - Enable FatFS long filename support * Re-use common log messages (#138) For consistency and binary size reduction * Toolbar spinner should get margin to the right * More TactilityC features (#139) * Rewrote Loader - Simplified Loader by removing custom threa - Created DispatcherThread - Move auto-starting apps to Boot app - Fixed Dispatcher bug where it could get stuck not processing new messages * Hide AP settings if the AP is not saved * Missing from previous commit * Replace LV_EVENT_CLICKED with LV_EVENT_SHORT_CLICKED * Refactored files app and created InputDialog (#140) - Changed Files app so that it has a View and State - Files app now allows for long-pressing on files to perform actions - Files app now has rename and delete actions - Created InputDialog app - Improved AlertDialog app layout
37 lines
1.1 KiB
C
37 lines
1.1 KiB
C
#pragma once
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
typedef void* TimerHandle;
|
|
|
|
typedef enum {
|
|
TimerTypeOnce = 0, ///< One-shot timer.
|
|
TimerTypePeriodic = 1 ///< Repeating timer.
|
|
} TimerType;
|
|
|
|
typedef enum {
|
|
TimerThreadPriorityNormal, /**< Lower then other threads */
|
|
TimerThreadPriorityElevated, /**< Same as other threads */
|
|
} TimerThreadPriority;
|
|
|
|
typedef void (*TimerCallback)(void* context);
|
|
typedef void (*TimerPendingCallback)(void* context, uint32_t arg);
|
|
|
|
TimerHandle tt_timer_alloc(TimerType type, TimerCallback callback, void* callbackContext);
|
|
void tt_timer_free(TimerHandle handle);
|
|
bool tt_timer_start(TimerHandle handle, uint32_t intervalTicks);
|
|
bool tt_timer_restart(TimerHandle handle, uint32_t intervalTicks);
|
|
bool tt_timer_stop(TimerHandle handle);
|
|
bool tt_timer_is_running(TimerHandle handle);
|
|
uint32_t tt_timer_get_expire_time(TimerHandle handle);
|
|
bool tt_timer_set_pending_callback(TimerHandle handle, TimerPendingCallback callback, void* callbackContext, uint32_t arg);
|
|
void tt_timer_set_thread_priority(TimerHandle handle, TimerThreadPriority priority);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif |