es32c2: Support for esp32c2

This includes some memory optimisations.
Also corresponding changes required for idf 5.0.
This commit is contained in:
Chirag Atal
2022-09-14 12:24:49 +05:30
committed by Shubham Patil
parent 30edd36b52
commit 4b7c107b0e
12 changed files with 124 additions and 30 deletions
+24
View File
@@ -36,4 +36,28 @@ menu "ESP Matter"
endchoice
config ESP_MATTER_MAX_DYNAMIC_ENDPOINT_COUNT
int "Maximum dynamic endpoints"
default 16
help
The maximum dynamic endpoints supported.
config ESP_MATTER_SCENES_TABLE_SIZE
int "Scenes table size"
default 3
help
Size of the scenes table.
config ESP_MATTER_BINDING_TABLE_SIZE
int "Binding table size"
default 10
help
Size of the binding table.
config ESP_MATTER_UNICAST_MESSAGE_COUNT
int "Unicast message count"
default 10
help
APS unicast message count.
endmenu
+1 -1
View File
@@ -756,7 +756,7 @@ esp_err_t chip_stack_unlock()
static void esp_matter_chip_init_task(intptr_t context)
{
xTaskHandle task_to_notify = reinterpret_cast<xTaskHandle>(context);
TaskHandle_t task_to_notify = reinterpret_cast<TaskHandle_t>(context);
static chip::CommonCaseDeviceServerInitParams initParams;
initParams.InitializeStaticResourcesBeforeServerInit();
@@ -20,13 +20,15 @@
// Prevent multiple inclusion
#pragma once
#include <sdkconfig.h>
// User options for plugin Binding Table Library
#define EMBER_BINDING_TABLE_SIZE 10
#define EMBER_BINDING_TABLE_SIZE CONFIG_ESP_MATTER_BINDING_TABLE_SIZE
/**** Network Section ****/
#define EMBER_SUPPORTED_NETWORKS (1)
#define EMBER_APS_UNICAST_MESSAGE_COUNT 10
#define EMBER_APS_UNICAST_MESSAGE_COUNT CONFIG_ESP_MATTER_UNICAST_MESSAGE_COUNT
/* Cluster macros for all */
#define ZCL_USING_ACCESS_CONTROL_CLUSTER_SERVER
@@ -167,25 +169,26 @@
/* Other cluster specific macros which are made generic */
#define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in account login
#define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in application basic
#define EMBER_AF_APPLICATION_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in application launcher
#define EMBER_AF_AUDIO_OUTPUT_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in audio output
#define EMBER_AF_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in channel
#define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in color control
#define EMBER_AF_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in content launch
#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in identify
#define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in keypad input
#define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in level control
#define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in low power
#define EMBER_AF_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in media input
#define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in media playback
#define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in on off
#define EMBER_AF_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in ota software update provider
#define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in target navigator
#define EMBER_AF_WAKE_ON_LAN_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in wake on lan
#define EMBER_AF_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in window covering
#define EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (16) // used in door lock
#define DYNAMIC_ENDPOINTS CONFIG_ESP_MATTER_MAX_DYNAMIC_ENDPOINT_COUNT
#define EMBER_AF_ACCOUNT_LOGIN_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in account login
#define EMBER_AF_APPLICATION_BASIC_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in application basic
#define EMBER_AF_APPLICATION_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in application launcher
#define EMBER_AF_AUDIO_OUTPUT_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in audio output
#define EMBER_AF_CHANNEL_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in channel
#define EMBER_AF_COLOR_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in color control
#define EMBER_AF_CONTENT_LAUNCHER_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in content launch
#define EMBER_AF_IDENTIFY_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in identify
#define EMBER_AF_KEYPAD_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in keypad input
#define EMBER_AF_LEVEL_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in level control
#define EMBER_AF_LOW_POWER_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in low power
#define EMBER_AF_MEDIA_INPUT_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in media input
#define EMBER_AF_MEDIA_PLAYBACK_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in media playback
#define EMBER_AF_ON_OFF_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in on off
#define EMBER_AF_OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in ota software update provider
#define EMBER_AF_TARGET_NAVIGATOR_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in target navigator
#define EMBER_AF_WAKE_ON_LAN_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in wake on lan
#define EMBER_AF_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in window covering
#define EMBER_AF_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT DYNAMIC_ENDPOINTS // used in door lock
#define MATTER_SCENES_TABLE_SIZE 3 // used in scenes // TODO: check this again
#define MATTER_SCENES_TABLE_SIZE CONFIG_ESP_MATTER_SCENES_TABLE_SIZE // used in scenes // TODO: check this again