1
6
7
8
9
10
16
17
18
19
20
21
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
69
70
71
79
80
81
85
86
87
95
96
97
98
99
100
101
102
103
104
105
106
107
112
113
114
119
120
121
122
123
124
125
/* ... */
#ifndef __ESP_SYSTEM_H__
#define __ESP_SYSTEM_H__
#include <stdint.h>
#include <stdbool.h>
#include "esp_err.h"
#include "esp_attr.h"
#include "esp_bit_defs.h"
#include "esp_idf_version.h"6 includes
#ifdef __cplusplus
extern "C" {
#endif
/* ... */
typedef enum {
ESP_RST_UNKNOWN,
ESP_RST_POWERON,
ESP_RST_EXT,
ESP_RST_SW,
ESP_RST_PANIC,
ESP_RST_INT_WDT,
ESP_RST_TASK_WDT,
ESP_RST_WDT,
ESP_RST_DEEPSLEEP,
ESP_RST_BROWNOUT,
ESP_RST_SDIO,
ESP_RST_USB,
ESP_RST_JTAG,
ESP_RST_EFUSE,
ESP_RST_PWR_GLITCH,
ESP_RST_CPU_LOCKUP,
}{ ... } esp_reset_reason_t;
/* ... */
typedef void (*shutdown_handler_t)(void);
/* ... */
esp_err_t esp_register_shutdown_handler(shutdown_handler_t handle);
/* ... */
esp_err_t esp_unregister_shutdown_handler(shutdown_handler_t handle);
/* ... */
void esp_restart(void) __attribute__((__noreturn__));
/* ... */
esp_reset_reason_t esp_reset_reason(void);
/* ... */
uint32_t esp_get_free_heap_size(void);
/* ... */
uint32_t esp_get_free_internal_heap_size(void);
/* ... */
uint32_t esp_get_minimum_free_heap_size(void);
/* ... */
void __attribute__((__noreturn__)) esp_system_abort(const char* details);
#ifdef __cplusplus
}{...}
#endif
/* ... */
#endif