提交 143d0ea4 编写于 作者: honorifica's avatar honorifica

进行了改错已确保克隆能跑

上级 779ab21d
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclipse.cdt.core.settings">
<cconfiguration id="org.eclipse.cdt.core.default.config.1301758148">
<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="org.eclipse.cdt.core.default.config.1301758148" moduleId="org.eclipse.cdt.core.settings" name="Configuration">
<cconfiguration id="org.eclipse.cdt.core.default.config.1745169845">
<storageModule buildSystemId="org.eclipse.cdt.core.defaultConfigDataProvider" id="org.eclipse.cdt.core.default.config.1745169845" moduleId="org.eclipse.cdt.core.settings" name="Configuration">
<externalSettings/>
<extensions/>
</storageModule>
......
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_16" default="true" project-jdk-name="16" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/classes" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/factory_demo.iml" filepath="$PROJECT_DIR$/factory_demo.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="8445ba6e-b8f0-41db-8447-4fcd4bb20855" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/main/app/app_sr.c" beforeDir="false" afterPath="$PROJECT_DIR$/main/app/app_sr.c" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main/app/app_sr.h" beforeDir="false" afterPath="$PROJECT_DIR$/main/app/app_sr.h" afterDir="false" />
<change beforePath="$PROJECT_DIR$/main/app/app_sr_handler.c" beforeDir="false" afterPath="$PROJECT_DIR$/main/app/app_sr_handler.c" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/../.." />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2BTAGpsDcBpkAmS5OPJXLtKnJxv" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false",
"last_opened_file_path": "G:/项目/物联网/aedServer",
"nodejs_package_manager_path": "npm"
}
}]]></component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="8445ba6e-b8f0-41db-8447-4fcd4bb20855" name="Changes" comment="" />
<created>1656919607678</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1656919607678</updated>
<workItem from="1656919615133" duration="17000" />
</task>
<servers />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>heart-rate-esp32s3</name>
<name>factory_demo</name>
<comment></comment>
<projects>
</projects>
......
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager">
<output url="file://$MODULE_DIR$/bin" />
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
/*
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Unlicense OR CC0-1.0
*/
#include <stdbool.h>
#include <stdint.h>
#include "bsp_board.h"
#include "bsp_codec.h"
#include "driver/gpio.h"
#include "ui_main.h"
LV_IMG_DECLARE(mute_on)
LV_IMG_DECLARE(mute_off)
LV_FONT_DECLARE(font_en_16)
static int32_t mute_disp_count = 15;
static const int32_t disp_time = 15;
static bool mute_state = false;
static void mute_timer_cb(lv_timer_t *timer)
{
lv_obj_t *obj = (lv_obj_t *) timer->user_data;
lv_obj_t *img = (lv_obj_t *) obj->user_data;
if (mute_disp_count <= disp_time) {
if (mute_disp_count == 0) {
if (mute_state) {
lv_img_set_src(img, &mute_on);
} else {
lv_img_set_src(img, &mute_off);
}
} else if (disp_time != mute_disp_count) {
lv_obj_clear_flag(obj, LV_OBJ_FLAG_HIDDEN);
lv_obj_move_foreground(obj);
if (mute_disp_count == 2) {
bsp_codec_init(AUDIO_HAL_16K_SAMPLES);
}
} else {
lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN);
}
mute_disp_count++;
}
}
void ui_mute_init(void)
{
static lv_obj_t *obj = NULL;
static lv_obj_t *img = NULL;
if (NULL == obj) {
obj = lv_obj_create(lv_scr_act());
lv_obj_add_flag(obj, LV_OBJ_FLAG_HIDDEN);
lv_obj_clear_flag(obj, LV_OBJ_FLAG_SCROLLABLE);
lv_obj_set_size(obj, 180, 45);
lv_obj_set_style_bg_color(obj, lv_color_white(), LV_STATE_DEFAULT);
lv_obj_set_style_border_width(obj, 0, LV_STATE_DEFAULT);
lv_obj_set_style_radius(obj, 10, LV_STATE_DEFAULT);
lv_obj_set_style_shadow_width(obj, 20, LV_STATE_DEFAULT);
lv_obj_set_style_shadow_opa(obj, LV_OPA_50, LV_STATE_DEFAULT);
lv_obj_align(obj, LV_ALIGN_TOP_MID, 0, 10);
lv_obj_t *lab = lv_label_create(obj);
lv_label_set_text_static(lab, "Voice Command");
lv_obj_set_style_text_font(lab, &font_en_16, LV_STATE_DEFAULT);
lv_obj_set_style_text_color(lab, lv_color_black(), LV_STATE_DEFAULT);
lv_obj_align(lab, LV_ALIGN_CENTER, 10, 0);
img = lv_img_create(obj);
lv_img_set_src(img, &mute_on);
lv_obj_align(img, LV_ALIGN_CENTER, -70, 0);
lv_obj_set_user_data(obj, (void *) img);
}
lv_timer_create(mute_timer_cb, 100, (void *) obj);
}
static void ui_mute_set_state(bool mute)
{
mute_state = mute;
mute_disp_count = 0;
}
/**
* @brief Mute button handler.
*
* @note Due to other examples might have no handler of mute button. So the
* default handler just simply print the mute button state and marked
* as `WEAK` so that you can rewrite the isr handler.
*
* @param arg Unused
*/
void mute_btn_handler(void *arg)
{
(void) arg;
const board_res_desc_t *brd = bsp_board_get_description();
if (brd->GPIO_MUTE_LEVEL == gpio_get_level(brd->GPIO_MUTE_NUM)) {
ets_printf(DRAM_STR("Mute Off"));
ui_mute_set_state(0);
} else {
ets_printf(DRAM_STR("Mute On"));
ui_mute_set_state(1);
}
}
......@@ -75,73 +75,6 @@ CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
# end of Security features
#
# Boot ROM Behavior
#
CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y
# CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set
# CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set
# CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set
# end of Boot ROM Behavior
#
# Serial flasher config
#
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
# CONFIG_ESPTOOLPY_NO_STUB is not set
# CONFIG_ESPTOOLPY_OCT_FLASH is not set
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y
CONFIG_ESPTOOLPY_FLASHMODE="dio"
# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
CONFIG_ESPTOOLPY_FLASHFREQ="80m"
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_32MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_64MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_128MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
# CONFIG_ESPTOOLPY_FLASHSIZE_DETECT is not set
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
# CONFIG_ESPTOOLPY_AFTER_NORESET is not set
CONFIG_ESPTOOLPY_AFTER="hard_reset"
# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set
CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# end of Serial flasher config
#
# Partition Table
#
# CONFIG_PARTITION_TABLE_SINGLE_APP is not set
# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
# end of Partition Table
#
# HMI Board Config
#
......@@ -592,6 +525,57 @@ CONFIG_EN_SPEECH_COMMAND_ID199=""
# end of Add English speech commands
# end of ESP Speech Recognition
#
# Boot ROM Behavior
#
CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y
# CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set
# CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set
# CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set
# end of Boot ROM Behavior
#
# Serial flasher config
#
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_NO_STUB=y
# CONFIG_ESPTOOLPY_OCT_FLASH is not set
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y
CONFIG_ESPTOOLPY_FLASHMODE="dio"
# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
CONFIG_ESPTOOLPY_FLASHFREQ="80m"
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y
CONFIG_ESPTOOLPY_FLASHSIZE="16MB"
# CONFIG_ESPTOOLPY_FLASHSIZE_DETECT is not set
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
# CONFIG_ESPTOOLPY_AFTER_NORESET is not set
CONFIG_ESPTOOLPY_AFTER="hard_reset"
# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set
CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# end of Serial flasher config
#
# LVGL configuration
#
......@@ -863,6 +847,19 @@ CONFIG_LV_BUILD_EXAMPLES=y
# CONFIG_LV_PORT_SHOW_MOUSE_CURSOR is not set
# end of LVGL configuration
#
# Partition Table
#
# CONFIG_PARTITION_TABLE_SINGLE_APP is not set
# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set
# CONFIG_PARTITION_TABLE_TWO_OTA is not set
CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x8000
CONFIG_PARTITION_TABLE_MD5=y
# end of Partition Table
#
# ESP RainMaker Config
#
......@@ -1125,8 +1122,8 @@ CONFIG_EFUSE_MAX_BLK_LEN=256
#
CONFIG_ESP_TLS_USING_MBEDTLS=y
CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
# CONFIG_ESP_TLS_SERVER is not set
# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set
# CONFIG_ESP_TLS_PSK_VERIFICATION is not set
# CONFIG_ESP_TLS_INSECURE is not set
# end of ESP-TLS
......@@ -1340,7 +1337,6 @@ CONFIG_ESP_IPC_ISR_ENABLE=y
# LCD Peripheral Configuration
#
CONFIG_LCD_PANEL_IO_FORMAT_BUF_SIZE=32
# CONFIG_LCD_RGB_ISR_IRAM_SAFE is not set
# end of LCD Peripheral Configuration
# end of LCD and Touch Panel
......@@ -1604,6 +1600,18 @@ CONFIG_HEAP_TRACING_OFF=y
# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set
# end of Heap memory debugging
#
# IoT Button
#
CONFIG_BUTTON_PERIOD_TIME_MS=5
CONFIG_BUTTON_DEBOUNCE_TICKS=2
CONFIG_BUTTON_SHORT_PRESS_TIME_MS=100
CONFIG_BUTTON_LONG_PRESS_TIME_MS=5000
CONFIG_ADC_BUTTON_MAX_CHANNEL=3
CONFIG_ADC_BUTTON_MAX_BUTTON_PER_CHANNEL=4
CONFIG_ADC_BUTTON_SAMPLE_TIMES=1
# end of IoT Button
#
# jsmn
#
......@@ -2112,9 +2120,7 @@ CONFIG_WL_SECTOR_SIZE=4096
#
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
CONFIG_WIFI_PROV_BLE_BONDING=y
CONFIG_WIFI_PROV_BLE_SEC_CONN=y
CONFIG_WIFI_PROV_BLE_FORCE_ENCRYPTION=y
# CONFIG_WIFI_PROV_BLE_BONDING is not set
# end of Wi-Fi Provisioning Manager
#
......@@ -2127,22 +2133,8 @@ CONFIG_WPA_MBEDTLS_CRYPTO=y
# CONFIG_WPA_TESTING_OPTIONS is not set
# CONFIG_WPA_WPS_STRICT is not set
# CONFIG_WPA_11KV_SUPPORT is not set
# CONFIG_WPA_MBO_SUPPORT is not set
# CONFIG_WPA_DPP_SUPPORT is not set
# end of Supplicant
#
# IoT Button
#
CONFIG_BUTTON_PERIOD_TIME_MS=5
CONFIG_BUTTON_DEBOUNCE_TICKS=2
CONFIG_BUTTON_SHORT_PRESS_TIME_MS=100
CONFIG_BUTTON_LONG_PRESS_TIME_MS=5000
CONFIG_ADC_BUTTON_MAX_CHANNEL=3
CONFIG_ADC_BUTTON_MAX_BUTTON_PER_CHANNEL=4
CONFIG_ADC_BUTTON_SAMPLE_TIMES=1
# end of IoT Button
#
# Button
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册