Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b5a6f1c

Browse files
Merge pull request #11773 from espressif/idf-release/v5.5
IDF release/v5.5
2 parents adac4c2 + d10bc28 commit b5a6f1c

File tree

9 files changed

+112
-82
lines changed

9 files changed

+112
-82
lines changed

‎boards.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -502,6 +502,10 @@ esp32p4.menu.PartitionScheme.app5M_little24M_32MB.upload.maximum_size=4718592
502502
esp32p4.menu.PartitionScheme.app13M_data7M_32MB=32M Flash (13MB APP/6.75MB SPIFFS)
503503
esp32p4.menu.PartitionScheme.app13M_data7M_32MB.build.partitions=default_32MB
504504
esp32p4.menu.PartitionScheme.app13M_data7M_32MB.upload.maximum_size=13107200
505+
esp32p4.menu.PartitionScheme.esp_sr_16=ESP SR 16M (3MB APP/7MB SPIFFS/2.9MB MODEL)
506+
esp32p4.menu.PartitionScheme.esp_sr_16.upload.maximum_size=3145728
507+
esp32p4.menu.PartitionScheme.esp_sr_16.upload.extra_flags=0xD10000 {build.path}/srmodels.bin
508+
esp32p4.menu.PartitionScheme.esp_sr_16.build.partitions=esp_sr_16
505509
esp32p4.menu.PartitionScheme.custom=Custom
506510
esp32p4.menu.PartitionScheme.custom.build.partitions=
507511
esp32p4.menu.PartitionScheme.custom.upload.maximum_size=16777216

‎libraries/ESP_SR/examples/Basic/Basic.ino

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,17 @@
99
#define LIGHT_PIN 40
1010
#define FAN_PIN 41
1111

12+
/**
13+
* The input format:
14+
* M to represent the microphone channel
15+
* R to represent the playback reference channel
16+
* N to represent an unknown or unused channel
17+
*
18+
* For example, input_format="MMNR" indicates that the input data consists of four channels,
19+
* which are the microphone channel, the microphone channel, an unused channel, and the playback channel
20+
*/
21+
#define SR_INPUT_FORMAT "MM"
22+
1223
I2SClass i2s;
1324

1425
// Generated using the following command:
@@ -69,7 +80,7 @@ void setup() {
6980
i2s.begin(I2S_MODE_STD, 16000, I2S_DATA_BIT_WIDTH_16BIT, I2S_SLOT_MODE_STEREO);
7081

7182
ESP_SR.onEvent(onSrEvent);
72-
ESP_SR.begin(i2s, sr_commands, sizeof(sr_commands) / sizeof(sr_cmd_t), SR_CHANNELS_STEREO, SR_MODE_WAKEWORD);
83+
ESP_SR.begin(i2s, sr_commands, sizeof(sr_commands) / sizeof(sr_cmd_t), SR_CHANNELS_STEREO, SR_MODE_WAKEWORD, SR_INPUT_FORMAT);
7384
}
7485

7586
void loop() {}

‎libraries/ESP_SR/examples/Basic/ci.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
"fqbn": {
33
"esp32s3": [
44
"espressif:esp32:esp32s3:USBMode=default,PartitionScheme=esp_sr_16,FlashSize=16M,FlashMode=dio"
5+
],
6+
"esp32p4": [
7+
"espressif:esp32:esp32p4:USBMode=default,PartitionScheme=esp_sr_16,FlashSize=16M,FlashMode=qio"
58
]
69
},
710
"requires": [
@@ -12,7 +15,6 @@
1215
"esp32c3": false,
1316
"esp32c6": false,
1417
"esp32h2": false,
15-
"esp32p4": false,
1618
"esp32s2": false,
1719
"esp32c5": false
1820
}

‎libraries/ESP_SR/src/ESP_SR.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Unlicense OR CC0-1.0
55
*/
66
#include "sdkconfig.h"
7-
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4) && (CONFIG_USE_WAKENET || CONFIG_USE_MULTINET)
7+
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4) && (CONFIG_MODEL_IN_FLASH || CONFIG_MODEL_IN_SDCARD)
88
#include "ESP_SR.h"
99

1010
static esp_err_t on_sr_fill(void *arg, void *out, size_t len, size_t *bytes_read, uint32_t timeout_ms) {
@@ -25,9 +25,9 @@ void ESP_SR_Class::onEvent(sr_cb event_cb) {
2525
cb = event_cb;
2626
}
2727

28-
bool ESP_SR_Class::begin(I2SClass &_i2s, const sr_cmd_t *sr_commands, size_t sr_commands_len, sr_channels_t rx_chan, sr_mode_t mode) {
28+
bool ESP_SR_Class::begin(I2SClass &_i2s, const sr_cmd_t *sr_commands, size_t sr_commands_len, sr_channels_t rx_chan, sr_mode_t mode, constchar *input_format) {
2929
i2s = &_i2s;
30-
esp_err_t err = sr_start(on_sr_fill, this, rx_chan, mode, sr_commands, sr_commands_len, on_sr_event, this);
30+
esp_err_t err = sr_start(on_sr_fill, this, rx_chan, mode, input_format, sr_commands, sr_commands_len, on_sr_event, this);
3131
return (err == ESP_OK);
3232
}
3333

‎libraries/ESP_SR/src/ESP_SR.h

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#pragma once
88
#include "sdkconfig.h"
9-
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4) && (CONFIG_USE_WAKENET || CONFIG_USE_MULTINET)
9+
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4) && (CONFIG_MODEL_IN_FLASH || CONFIG_MODEL_IN_SDCARD)
1010

1111
#include "ESP_I2S.h"
1212
#include "esp32-hal-sr.h"
@@ -23,7 +23,19 @@ class ESP_SR_Class {
2323
~ESP_SR_Class();
2424

2525
void onEvent(sr_cb cb);
26-
bool begin(I2SClass &i2s, const sr_cmd_t *sr_commands, size_t sr_commands_len, sr_channels_t rx_chan = SR_CHANNELS_STEREO, sr_mode_t mode = SR_MODE_WAKEWORD);
26+
/**
27+
* The input format:
28+
* M to represent the microphone channel
29+
* R to represent the playback reference channel
30+
* N to represent an unknown or unused channel
31+
*
32+
* For example, input_format="MMNR" indicates that the input data consists of four channels,
33+
* which are the microphone channel, the microphone channel, an unused channel, and the playback channel
34+
*/
35+
bool begin(
36+
I2SClass &i2s, const sr_cmd_t *sr_commands, size_t sr_commands_len, sr_channels_t rx_chan = SR_CHANNELS_STEREO, sr_mode_t mode = SR_MODE_WAKEWORD,
37+
const char *input_format = "MN"
38+
);
2739
bool end(void);
2840
bool setMode(sr_mode_t mode);
2941
bool pause(void);

‎libraries/ESP_SR/src/esp32-hal-sr.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Unlicense OR CC0-1.0
55
*/
66
#include "sdkconfig.h"
7-
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4) && (CONFIG_USE_WAKENET || CONFIG_USE_MULTINET)
7+
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4) && (CONFIG_MODEL_IN_FLASH || CONFIG_MODEL_IN_SDCARD)
88

99
#if !defined(ARDUINO_PARTITION_esp_sr_32) && !defined(ARDUINO_PARTITION_esp_sr_16) && !defined(ARDUINO_PARTITION_esp_sr_8)
1010
#warning Compatible partition must be selected for ESP_SR to work
@@ -313,7 +313,8 @@ esp_err_t sr_set_mode(sr_mode_t mode) {
313313
}
314314

315315
esp_err_t sr_start(
316-
sr_fill_cb fill_cb, void *fill_cb_arg, sr_channels_t rx_chan, sr_mode_t mode, const sr_cmd_t sr_commands[], size_t cmd_number, sr_event_cb cb, void *cb_arg
316+
sr_fill_cb fill_cb, void *fill_cb_arg, sr_channels_t rx_chan, sr_mode_t mode, const char *input_format, const sr_cmd_t sr_commands[], size_t cmd_number,
317+
sr_event_cb cb, void *cb_arg
317318
) {
318319
esp_err_t ret = ESP_OK;
319320
ESP_RETURN_ON_FALSE(NULL == g_sr_data, ESP_ERR_INVALID_STATE, "SR already running");
@@ -340,12 +341,11 @@ esp_err_t sr_start(
340341
models = esp_srmodel_init("model");
341342

342343
// Load WakeWord Detection
343-
g_sr_data->afe_handle = (esp_afe_sr_iface_t *)&ESP_AFE_SR_HANDLE;
344-
afe_config_t afe_config = AFE_CONFIG_DEFAULT();
345-
afe_config.wakenet_model_name = esp_srmodel_filter(models, ESP_WN_PREFIX, "hiesp");
346-
afe_config.aec_init = false;
344+
afe_config_t *afe_config = afe_config_init(input_format, models, AFE_TYPE_SR, AFE_MODE_LOW_COST);
345+
g_sr_data->afe_handle = esp_afe_handle_from_config(afe_config);
347346
log_d("load wakenet '%s'", afe_config.wakenet_model_name);
348-
g_sr_data->afe_data = g_sr_data->afe_handle->create_from_config(&afe_config);
347+
g_sr_data->afe_data = g_sr_data->afe_handle->create_from_config(afe_config);
348+
afe_config_free(afe_config);
349349

350350
// Load Custom Command Detection
351351
char *mn_name = esp_srmodel_filter(models, ESP_MN_PREFIX, ESP_MN_ENGLISH);

‎libraries/ESP_SR/src/esp32-hal-sr.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#pragma once
88
#include "sdkconfig.h"
9-
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4) && (CONFIG_USE_WAKENET || CONFIG_USE_MULTINET)
9+
#if (CONFIG_IDF_TARGET_ESP32S3 || CONFIG_IDF_TARGET_ESP32P4) && (CONFIG_MODEL_IN_FLASH || CONFIG_MODEL_IN_SDCARD)
1010

1111
#include "driver/i2s_types.h"
1212
#include "esp_err.h"
@@ -49,7 +49,8 @@ typedef void (*sr_event_cb)(void *arg, sr_event_t event, int command_id, int phr
4949
typedef esp_err_t (*sr_fill_cb)(void *arg, void *out, size_t len, size_t *bytes_read, uint32_t timeout_ms);
5050

5151
esp_err_t sr_start(
52-
sr_fill_cb fill_cb, void *fill_cb_arg, sr_channels_t rx_chan, sr_mode_t mode, const sr_cmd_t *sr_commands, size_t cmd_number, sr_event_cb cb, void *cb_arg
52+
sr_fill_cb fill_cb, void *fill_cb_arg, sr_channels_t rx_chan, sr_mode_t mode, const char *input_format, const sr_cmd_t *sr_commands, size_t cmd_number,
53+
sr_event_cb cb, void *cb_arg
5354
);
5455
esp_err_t sr_stop(void);
5556
esp_err_t sr_pause(void);

‎libraries/Zigbee/src/ep/ZigbeePressureSensor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@
3838
.pressure_meas_cfg = \
3939
{ \
4040
.measured_value = ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_VALUE_DEFAULT_VALUE, \
41-
.min_value = ESP_ZB_ZCL_PATTR_RESSURE_MEASUREMENT_MIN_VALUE_DEFAULT_VALUE, \
42-
.max_value = ESP_ZB_ZCL_PATTR_RESSURE_MEASUREMENT_MAX_VALUE_DEFAULT_VALUE, \
41+
.min_value = ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MIN_VALUE_DEFAULT_VALUE, \
42+
.max_value = ESP_ZB_ZCL_ATTR_PRESSURE_MEASUREMENT_MAX_VALUE_DEFAULT_VALUE, \
4343
}, \
4444
}
4545
// clang-format on

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /