Skip to content

Commit

Permalink
[ESP32] options to configure bg task priority, size, event queue size (
Browse files Browse the repository at this point in the history
…#27448)

I missed adding them in #27348
  • Loading branch information
shubhamdp authored and pull[bot] committed Oct 19, 2023
1 parent 3e702c0 commit 1432984
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
25 changes: 25 additions & 0 deletions config/esp32/components/chip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,31 @@ menu "CHIP Device Layer"
When this option is enabled, the main matter task can delegate some
time consuming operations to a background task so that the main matter
task is not blocked and can process other work.

config BG_CHIP_TASK_STACK_SIZE
depends on ENABLE_BG_EVENT_PROCESSING
int "Background CHIP Task Stack Size"
range 0 8192
default 6144
help
The size (in bytes) of the background CHIP task stack.

config BG_CHIP_TASK_PRIORITY
depends on ENABLE_BG_EVENT_PROCESSING
int "Background CHIP Task Priority"
range 0 256
default 1
help
The priority of the background CHIP task.

config BG_MAX_EVENT_QUEUE_SIZE
depends on ENABLE_BG_EVENT_PROCESSING
int "Max Event Queue Size"
range 1 8
default 1
help
The maximum number of events that can be held in the background CHIP Platform event queue.

endmenu

menu "Device Identification Options"
Expand Down
5 changes: 5 additions & 0 deletions src/platform/ESP32/CHIPDevicePlatformConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,9 @@
#define CHIP_DEVICE_CONFIG_ENABLE_DEVICE_INSTANCE_INFO_PROVIDER CONFIG_ENABLE_ESP32_DEVICE_INSTANCE_INFO_PROVIDER
#define CHIP_DEVICE_CONFIG_DISCOVERY_TIMEOUT_SECS CONFIG_CHIP_DISCOVERY_TIMEOUT_SECS
#define CHIP_DEVICE_CONFIG_ENABLE_BOTH_COMMISSIONER_AND_COMMISSIONEE CONFIG_ENABLE_ESP32_BLE_CONTROLLER

// Options for background chip task
#define CHIP_DEVICE_CONFIG_ENABLE_BG_EVENT_PROCESSING CONFIG_ENABLE_BG_EVENT_PROCESSING
#define CHIP_DEVICE_CONFIG_BG_TASK_PRIORITY CONFIG_BG_CHIP_TASK_PRIORITY
#define CHIP_DEVICE_CONFIG_BG_MAX_EVENT_QUEUE_SIZE CONFIG_BG_MAX_EVENT_QUEUE_SIZE
#define CHIP_DEVICE_CONFIG_BG_TASK_STACK_SIZE CONFIG_BG_CHIP_TASK_STACK_SIZE

0 comments on commit 1432984

Please sign in to comment.