25 #ifndef __ESP_SYSTEM_H__
26 #define __ESP_SYSTEM_H__
361 bool system_param_load(uint16 start_sec, uint16 offset,
void *param, uint16 len);
473 #define SYS_BOOT_ENHANCE_MODE 0
474 #define SYS_BOOT_NORMAL_MODE 1
476 #define SYS_BOOT_NORMAL_BIN 0
477 #define SYS_BOOT_TEST_BIN 1
489 uint8 system_get_boot_version(void);
548 #define SYS_CPU_80MHZ 80
549 #define SYS_CPU_160MHZ 160
uint16 system_get_vdd33(void)
Measure the power voltage of VDD3P3 pin 3 and 4, unit : 1/1024 V.
uint32 system_get_chip_id(void)
Get the chip ID.
void system_uart_swap(void)
UART0 swap.
struct rst_info * system_get_rst_info(void)
Get the reason of restart.
Definition: esp_system.h:46
void system_phy_set_rfoption(uint8 option)
Enable RF or not when wakeup from deep-sleep.
void system_print_meminfo(void)
Print the system memory distribution, including data/rodata/bss/heap.
Definition: esp_system.h:528
Definition: esp_system.h:49
Definition: esp_system.h:47
Definition: esp_system.h:530
void system_upgrade_flag_set(uint8 flag)
Set the upgrade status flag.
Definition: esp_system.h:533
void system_restore(void)
Reset to default settings.
Definition: esp_system.h:48
uint8 system_get_cpu_freq(void)
Get CPU frequency.
uint8 system_get_boot_mode(void)
Get the boot mode.
uint8 system_upgrade_flag_check()
Check the upgrade status flag.
Definition: esp_system.h:52
uint32 system_get_free_heap_size(void)
Get the size of available heap.
Definition: esp_system.h:44
bool system_param_save_with_protect(uint16 start_sec, void *param, uint16 len)
Write data into flash with protection.
Definition: esp_system.h:529
void system_phy_set_tpw_via_vdd33(uint16 vdd33)
Adjust the RF TX Power according to VDD33, unit : 1/1024 V.
Definition: esp_system.h:532
uint16 system_adc_read(void)
Measure the input voltage of TOUT pin 6, unit : 1/1024 V.
uint32 system_get_userbin_addr(void)
Get the address of the current running user bin (user1.bin or user2.bin).
flash_size_map
Definition: esp_system.h:526
void system_restart(void)
Restart system.
void system_deep_sleep(uint32 time_in_us)
Set the chip to deep-sleep mode.
rst_reason reason
Definition: esp_system.h:53
bool system_param_load(uint16 start_sec, uint16 offset, void *param, uint16 len)
Read the data saved into flash with the read/write protection.
bool system_restart_enhance(uint8 bin_type, uint32 bin_addr)
Restarts the system, and enters the enhanced boot mode.
uint32 system_get_rtc_time(void)
Get RTC time, unit: RTC clock cycle.
bool system_deep_sleep_set_option(uint8 option)
Call this API before system_deep_sleep to set the activity after the next deep-sleep wakeup...
uint32 system_get_time(void)
Get system time, unit: microsecond.
bool system_rtc_mem_write(uint8 dst, const void *src, uint16 n)
Write user data to the RTC memory.
bool system_update_cpu_freq(uint8 freq)
Set CPU frequency. Default is 80MHz.
Definition: esp_system.h:43
rst_reason
Definition: esp_system.h:42
Definition: esp_system.h:531
Definition: esp_system.h:527
void system_upgrade_reboot(void)
Reboot system to use the new software.
bool system_rtc_mem_read(uint8 src, void *dst, uint16 n)
Read user data from the RTC memory.
void system_phy_set_max_tpw(uint8 max_tpw)
Set the maximum value of RF TX Power, unit : 0.25dBm.
flash_size_map system_get_flash_size_map(void)
Get the current Flash size and Flash map.
Definition: esp_system.h:45
const char * system_get_sdk_version(void)
Get information of the SDK version.
uint32 system_rtc_clock_cali_proc(void)
Get the RTC clock cycle.
uint8 system_upgrade_userbin_check(void)
Check the user bin.
void system_uart_de_swap(void)
Disable UART0 swap.