forked from xiaozhi/xiaozhi-esp32
adjust board structure
This commit is contained in:
21
main/boards/common/system_reset.h
Normal file
21
main/boards/common/system_reset.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef _SYSTEM_RESET_H
|
||||
#define _SYSTEM_RESET_H
|
||||
|
||||
#include <driver/gpio.h>
|
||||
|
||||
class SystemReset {
|
||||
public:
|
||||
SystemReset(gpio_num_t reset_nvs_pin, gpio_num_t reset_factory_pin); // 构造函数私有化
|
||||
void CheckButtons();
|
||||
|
||||
private:
|
||||
gpio_num_t reset_nvs_pin_;
|
||||
gpio_num_t reset_factory_pin_;
|
||||
|
||||
void ResetNvsFlash();
|
||||
void ResetToFactory();
|
||||
void RestartInSeconds(int seconds);
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user