27#ifndef LIBRISHKA_SYS_H
28#define LIBRISHKA_SYS_H
Class for handling system utilities in Rishka applications.
Definition: sys.h:97
static i64 shellexec(string cmdline)
Execute a shell command.
Definition: librishka_sys.cpp:33
static void exit(i32 code)
Terminate the application with an exit code.
Definition: librishka_sys.cpp:37
static i64 random()
Generate a random integer value.
Definition: librishka_sys.cpp:50
static string info_str(sysinfos_t key)
Get system information as a string.
Definition: librishka_sys.cpp:41
static string working_dir()
Retrieves the current working directory.
Definition: librishka_sys.cpp:58
static void delay(u64 ms)
Delay execution for a specified duration.
Definition: librishka_sys.cpp:21
static u64 micros()
Get the current system time in microseconds.
Definition: librishka_sys.cpp:25
static u64 millis()
Get the current system time in milliseconds.
Definition: librishka_sys.cpp:29
static bool change_dir(char *directory)
Changes the current working directory.
Definition: librishka_sys.cpp:54
static i64 info_num(sysinfon_t key)
Get system information as a numeric value.
Definition: librishka_sys.cpp:46
sysinfon_t
Enumeration for system information numeric keys.
Definition: sys.h:39
@ SYSINFO_MIN_FREE_HEAP
Definition: sys.h:51
@ SYSINFO_MIN_FREE_PSRAM
Definition: sys.h:52
@ SYSINFO_MAX_ALLOC_HEAP
Definition: sys.h:50
@ SYSINFO_USED_STORAGE
Definition: sys.h:60
@ SYSINFO_FREE_HEAP
Definition: sys.h:47
@ SYSINFO_TOTAL_STORAGE
Definition: sys.h:59
@ SYSINFO_NUM_SECTORS
Definition: sys.h:57
@ SYSINFO_CHIP_REV
Definition: sys.h:41
@ SYSINFO_FLASH_MODE
Definition: sys.h:45
@ SYSINFO_CARD_TYPE
Definition: sys.h:55
@ SYSINFO_TEMP_VAL
Definition: sys.h:54
@ SYSINFO_CYCLE_COUNT
Definition: sys.h:43
@ SYSINFO_FREE_PSRAM
Definition: sys.h:48
@ SYSINFO_FLASH_SPEED
Definition: sys.h:46
@ SYSINFO_SECTOR_SIZE
Definition: sys.h:58
@ SYSINFO_PSRAM_SIZE
Definition: sys.h:53
@ SYSINFO_EFUSE_MAC
Definition: sys.h:44
@ SYSINFO_HEAP_SIZE
Definition: sys.h:49
@ SYSINFO_CHIPCORES
Definition: sys.h:40
@ SYSINFO_CPU_FREQ
Definition: sys.h:42
@ SYSINFO_CARD_SIZE
Definition: sys.h:56
sysinfos_t
Enumeration for system information string keys.
Definition: sys.h:70
@ SYSINFO_SKETCH_MD5
Definition: sys.h:73
@ SYSINFO_CHIPMODEL
Definition: sys.h:71
@ SYSINFO_SDK_VERSION
Definition: sys.h:72
sdcard_t
Enumeration for SD card types.
Definition: sys.h:82
@ SD_CARD_SDHC
Definition: sys.h:86
@ SD_CARD_UNKNOWN
Definition: sys.h:87
@ SD_CARD_SD
Definition: sys.h:85
@ SD_CARD_NONE
Definition: sys.h:83
@ SD_CARD_MMC
Definition: sys.h:84
Header file for common data types used in Rishka applications.
signed int i32
Alias for the signed 32-bit integer type.
Definition: types.h:58
signed long int i64
Alias for the signed 64-bit integer type.
Definition: types.h:64
unsigned long int u64
Alias for the unsigned 64-bit integer type.
Definition: types.h:88