|
@@ -47,6 +47,8 @@ static const ili9341_lcd_init_cmd_t vendor_specific_init[] = {
|
|
|
class Esp32S3Korvo2V3Board : public WifiBoard {
|
|
class Esp32S3Korvo2V3Board : public WifiBoard {
|
|
|
private:
|
|
private:
|
|
|
Button boot_button_;
|
|
Button boot_button_;
|
|
|
|
|
+ Button asr_button_;
|
|
|
|
|
+ Button asr_tian_wen_button_;
|
|
|
i2c_master_bus_handle_t i2c_bus_;
|
|
i2c_master_bus_handle_t i2c_bus_;
|
|
|
LcdDisplay* display_;
|
|
LcdDisplay* display_;
|
|
|
PowerManager *power_manager_;
|
|
PowerManager *power_manager_;
|
|
@@ -167,6 +169,17 @@ private:
|
|
|
boot_button_.OnPressUp([this]() {
|
|
boot_button_.OnPressUp([this]() {
|
|
|
// Application::GetInstance().StopListening();
|
|
// Application::GetInstance().StopListening();
|
|
|
});
|
|
});
|
|
|
|
|
+
|
|
|
|
|
+ asr_button_.OnClick([this]() {
|
|
|
|
|
+ std::string wake_word="你好小智";
|
|
|
|
|
+ Application::GetInstance().WakeWordInvoke(wake_word);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ asr_tian_wen_button_.OnPressUp([this]() {
|
|
|
|
|
+ std::string wake_word="你好小智";
|
|
|
|
|
+ Application::GetInstance().WakeWordInvoke(wake_word);
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void InitializeIli9341Display() {
|
|
void InitializeIli9341Display() {
|
|
@@ -262,7 +275,10 @@ private:
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public:
|
|
public:
|
|
|
- Esp32S3Korvo2V3Board() : boot_button_(BOOT_BUTTON_GPIO) {
|
|
|
|
|
|
|
+ Esp32S3Korvo2V3Board() : boot_button_(BOOT_BUTTON_GPIO),
|
|
|
|
|
+ asr_button_(ASR_BUTTON_GPIO),
|
|
|
|
|
+ asr_tian_wen_button_(ASR_TIAN_WEN_BUTTON_GPIO)
|
|
|
|
|
+ {
|
|
|
ESP_LOGI(TAG, "Initializing esp32s3_korvo2_v3 Board");
|
|
ESP_LOGI(TAG, "Initializing esp32s3_korvo2_v3 Board");
|
|
|
InitializeI2c();
|
|
InitializeI2c();
|
|
|
InitializePowerManager();
|
|
InitializePowerManager();
|