Skip to content

Commit

Permalink
ESP32: add more ICD kconfig options
Browse files Browse the repository at this point in the history
  • Loading branch information
wqx6 committed Sep 21, 2023
1 parent bfa9b4c commit 4aaa1e1
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
36 changes: 34 additions & 2 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ menu "CHIP Device Layer"
Enables or Disables ICD server

config ICD_SLOW_POLL_INTERVAL
int "ICD Slow Polling Interval"
int "ICD Slow Polling Interval(ms)"
depends on ENABLE_ICD_SERVER
default 5000
help
Expand All @@ -320,14 +320,46 @@ menu "CHIP Device Layer"
Interval.

config ICD_FAST_POLL_INTERVAL
int "ICD Fast Polling Interval"
int "ICD Fast Polling Interval(ms)"
depends on ENABLE_ICD_SERVER
default 200
help
Fast Polling defines the fastest frequency at which the device can receive messages
in Active Mode. The Fast Polling interval SHALL be smaller than the Active Mode
Interval.

config ICD_IDLE_MODE_INTERVAL
int "ICD Idle Mode Interval(s)"
depends on ENABLE_ICD_SERVER
default 2
help
This value indicates the maximum interval in seconds the server can stay in idle
mode.

config ICD_ACTIVE_MODE_INTERVAL
int "ICD Active Mode Interval(ms)"
depends on ENABLE_ICD_SERVER
default 300
help
This value indicates the minimum interval in milliseconds the server can stay in
active mode.

config ICD_ACTIVE_MODE_THRESHOLD
int "ICD Active Mode Threshold(ms)"
depends on ENABLE_ICD_SERVER
default 300
help
This value indicates the minimum amount of time in milliseconds the server typically
will stay active after network activity when in active mode.

config ICD_CLIENTS_SUPPORTED_PER_FABRIC
int "ICD Clients Number Supported Per Fabric"
depends on ENABLE_ICD_SERVER
default 1
help
This value indicates the maximum number of entries that the ICD server is able to store
for each fabric in the RegisteredClients attribute.

config ENABLE_BG_EVENT_PROCESSING
bool "Enable Background event processing"
default n
Expand Down
1 change: 1 addition & 0 deletions config/esp32/components/chip/idf_component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ dependencies:
# Issue: https://github.com/project-chip/connectedhomeip/issues/29125
rules:
- if: "idf_version >=5.0"
- if: "target != esp32h2"
20 changes: 20 additions & 0 deletions src/platform/ESP32/CHIPPlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,23 @@
#else
#define CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP 0
#endif

#if CONFIG_ENABLE_ICD_SERVER

#ifndef CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL
#define CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL CONFIG_ICD_IDLE_MODE_INTERVAL
#endif // CHIP_CONFIG_ICD_IDLE_MODE_INTERVAL

#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL
#define CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL CONFIG_ICD_ACTIVE_MODE_INTERVAL
#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_INTERVAL

#ifndef CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD
#define CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD CONFIG_ICD_ACTIVE_MODE_THRESHOLD
#endif // CHIP_CONFIG_ICD_ACTIVE_MODE_THRESHOLD

#ifndef CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC
#define CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC
#endif // CHIP_CONFIG_ICD_CLIENTS_SUPPORTED_PER_FABRIC

#endif // CONFIG_ENABLE_ICD_SERVER

0 comments on commit 4aaa1e1

Please sign in to comment.