mirror of
https://github.com/espressif/esp-sr.git
synced 2025-09-15 15:28:44 +08:00
Fix all warning in esp-sr
This commit is contained in:
parent
31b8cb660e
commit
5e77c29a5a
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
static char *TAG = "MN_COMMAND";
|
static char *TAG = "MN_COMMAND";
|
||||||
static esp_mn_node_t *esp_mn_root = NULL;
|
static esp_mn_node_t *esp_mn_root = NULL;
|
||||||
static esp_mn_iface_t *esp_mn_model_handle = NULL;
|
const static esp_mn_iface_t *esp_mn_model_handle = NULL;
|
||||||
static model_iface_data_t *esp_mn_model_data = NULL;
|
static model_iface_data_t *esp_mn_model_data = NULL;
|
||||||
|
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ static model_iface_data_t *esp_mn_model_data = NULL;
|
|||||||
} \
|
} \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
esp_err_t esp_mn_commands_alloc(esp_mn_iface_t *multinet, model_iface_data_t *model_data)
|
esp_err_t esp_mn_commands_alloc(const esp_mn_iface_t *multinet, model_iface_data_t *model_data)
|
||||||
{
|
{
|
||||||
if (esp_mn_root != NULL) {
|
if (esp_mn_root != NULL) {
|
||||||
esp_mn_commands_free();
|
esp_mn_commands_free();
|
||||||
@ -67,10 +67,12 @@ esp_err_t esp_mn_commands_clear(void)
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
esp_mn_node_t *esp_mn_command_search(char *string) {
|
esp_mn_node_t *esp_mn_command_search(char *string)
|
||||||
int command_id;
|
{
|
||||||
esp_mn_node_t *temp = esp_mn_root;
|
esp_mn_node_t *temp = esp_mn_root;
|
||||||
ESP_RETURN_ON_FALSE(NULL != esp_mn_root, ESP_ERR_INVALID_STATE, TAG, "The mn commands is not initialized");
|
if(NULL != esp_mn_root) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
while (temp->next) {
|
while (temp->next) {
|
||||||
temp = temp->next;
|
temp = temp->next;
|
||||||
|
|||||||
@ -29,7 +29,7 @@ It is easy to add one speech command into linked list and remove one speech comm
|
|||||||
* - ESP_ERR_NO_MEM No memory
|
* - ESP_ERR_NO_MEM No memory
|
||||||
* - ESP_ERR_INVALID_STATE The Speech Commands link has been initialized
|
* - ESP_ERR_INVALID_STATE The Speech Commands link has been initialized
|
||||||
*/
|
*/
|
||||||
esp_err_t esp_mn_commands_alloc(esp_mn_iface_t *multinet, model_iface_data_t *model_data);
|
esp_err_t esp_mn_commands_alloc(const esp_mn_iface_t *multinet, model_iface_data_t *model_data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Clear the speech commands linked list and free root node.
|
* @brief Clear the speech commands linked list and free root node.
|
||||||
|
|||||||
@ -7,7 +7,7 @@ if(IDF_TARGET STREQUAL "esp32")
|
|||||||
test_afe.c
|
test_afe.c
|
||||||
test_multinet.c)
|
test_multinet.c)
|
||||||
|
|
||||||
elseif(IDF_TARGET STREQUAL "esp32")
|
elseif(IDF_TARGET STREQUAL "esp32s3")
|
||||||
list(APPEND srcs test_wakenet.c
|
list(APPEND srcs test_wakenet.c
|
||||||
test_afe.c
|
test_afe.c
|
||||||
test_multinet.c)
|
test_multinet.c)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user