- Disable `DisplayDriver` for `St7701Display` (on CYD 4848) - Improve `GraphicsDemo`: check for feature capability and show alert dialog if there's an issue - `DevelopmentService` installs to `/data` instead of `/sdcard` - Fixed `tt_app_get_data_directory()` and `tt_app_get_data_directory_lvgl()` (C++ to C) - `tt_kernel.h` now defines `MAX_TICKS` - `tt_init.cpp` now exports `esp_log()` which is required since ESP-IDF 5.5
53 lines
1.3 KiB
C
53 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef unsigned long TickType;
|
|
|
|
#define MAX_TICKS INT32_MAX
|
|
|
|
/**
|
|
* Stall the current task for the specified amount of time.
|
|
* @param milliseconds the time in milliseconds to stall.
|
|
*/
|
|
void tt_kernel_delay_millis(uint32_t milliseconds);
|
|
|
|
/**
|
|
* Stall the current task for the specified amount of time.
|
|
* @param milliseconds the time in microsends to stall.
|
|
*/
|
|
void tt_kernel_delay_micros(uint32_t microSeconds);
|
|
|
|
/**
|
|
* Stall the current task for the specified amount of time.
|
|
* @param milliseconds the time in ticks to stall.
|
|
*/
|
|
void tt_kernel_delay_ticks(TickType ticks);
|
|
|
|
/** @return the number of ticks since the device was started */
|
|
TickType tt_kernel_get_ticks();
|
|
|
|
/** Convert milliseconds to ticks */
|
|
TickType tt_kernel_millis_to_ticks(uint32_t milliSeconds);
|
|
|
|
/** Stall the current task until the specified timestamp
|
|
* @return false if for some reason the delay was broken off
|
|
*/
|
|
bool tt_kernel_delay_until_tick(TickType tick);
|
|
|
|
/** @return the tick frequency of the kernel (commonly 1000 Hz when running FreeRTOS) */
|
|
uint32_t tt_kernel_get_tick_frequency();
|
|
|
|
/** @return the number of milliseconds that have passed since the device was started */
|
|
uint32_t tt_kernel_get_millis();
|
|
|
|
unsigned long tt_kernel_get_micros();
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|