Improvements for Files app and statusbar icon (#35)
- Created `tt_get_platform()` to use with more complex platform checks aside from the `ESP_PLATFORM` preprocessor directive - Expand PC/sim memory to 256k so we can load the max amount of entries in Files without memory issues. I decided to skip the LVGL buffer entirely so it's easier to catch memory leaks. - Simplified logic in `files_data.c` - Implement statusbar as a proper widget - Implement statusbar widget for wifi service - Implement statusbar widget for sdcard mounting/unmounting
This commit is contained in:
committed by
GitHub
parent
5880e841a3
commit
29ea47a7ba
@@ -194,3 +194,11 @@ void tt_delay_us(uint32_t microseconds) {
|
||||
usleep(microseconds);
|
||||
#endif
|
||||
}
|
||||
|
||||
Platform tt_get_platform() {
|
||||
#ifdef ESP_PLATFORM
|
||||
return PLATFORM_ESP;
|
||||
#else
|
||||
return PLATFORM_PC;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -6,6 +6,11 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
PLATFORM_ESP,
|
||||
PLATFORM_PC
|
||||
} Platform;
|
||||
|
||||
/** Check if CPU is in IRQ or kernel running and IRQ is masked
|
||||
*
|
||||
* Originally this primitive was born as a workaround for FreeRTOS kernel primitives shenanigans with PRIMASK.
|
||||
@@ -109,6 +114,8 @@ void tt_delay_ms(uint32_t milliseconds);
|
||||
*/
|
||||
void tt_delay_us(uint32_t microseconds);
|
||||
|
||||
Platform tt_get_platform();
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user