forked from xiaozhi/xiaozhi-esp32
v1.8.0: Audio 代码重构与低功耗优化 (#943)
* Reconstruct Audio Code * Remove old IoT implementation * Add MQTT-UDP documentation * OTA升级失败时,可以继续使用
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
class Button {
|
||||
public:
|
||||
Button(button_handle_t button_handle);
|
||||
Button(gpio_num_t gpio_num, bool active_high = false, uint16_t long_press_time = 0, uint16_t short_press_time = 0);
|
||||
Button(gpio_num_t gpio_num, bool active_high = false, uint16_t long_press_time = 0, uint16_t short_press_time = 0, bool enable_power_save = false);
|
||||
~Button();
|
||||
|
||||
void OnPressDown(std::function<void()> callback);
|
||||
@@ -40,4 +40,10 @@ public:
|
||||
};
|
||||
#endif
|
||||
|
||||
class PowerSaveButton : public Button {
|
||||
public:
|
||||
PowerSaveButton(gpio_num_t gpio_num) : Button(gpio_num, false, 0, 0, true) {
|
||||
}
|
||||
};
|
||||
|
||||
#endif // BUTTON_H_
|
||||
|
||||
Reference in New Issue
Block a user