diff --git a/components/byte90/Kconfig b/components/byte90/Kconfig index 4f0046200..a0d3800ed 100644 --- a/components/byte90/Kconfig +++ b/components/byte90/Kconfig @@ -5,4 +5,19 @@ menu "Byte90 Configuration" help Size of the stack used for the interrupt handler. Shared by the keyboard callback and the touch callback. + + config BYTE90_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 20 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config BYTE90_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/byte90/include/byte90.hpp b/components/byte90/include/byte90.hpp index 7fb881c7c..a3e69eb1f 100644 --- a/components/byte90/include/byte90.hpp +++ b/components/byte90/include/byte90.hpp @@ -330,7 +330,8 @@ class Byte90 : public BaseComponent { .event_queue_size = 50, .task_config = {.name = "byte90 interrupts", .stack_size_bytes = CONFIG_BYTE90_INTERRUPT_STACK_SIZE, - .priority = 20}}}; + .priority = CONFIG_BYTE90_INTERRUPT_PRIORITY, + .core_id = CONFIG_BYTE90_INTERRUPT_CORE_ID}}}; // button std::atomic button_initialized_{false}; diff --git a/components/esp-box/Kconfig b/components/esp-box/Kconfig index bdb669418..7f3ee5e01 100644 --- a/components/esp-box/Kconfig +++ b/components/esp-box/Kconfig @@ -5,4 +5,19 @@ menu "Esp-Box Configuration" help Size of the stack used for the interrupt handler. Used by the touch callback. + + config ESP_BOX_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config ESP_BOX_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/esp-box/include/esp-box.hpp b/components/esp-box/include/esp-box.hpp index 276a5f92a..cee3e549c 100644 --- a/components/esp-box/include/esp-box.hpp +++ b/components/esp-box/include/esp-box.hpp @@ -495,7 +495,9 @@ class EspBox : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "esp-box interrupts", - .stack_size_bytes = CONFIG_ESP_BOX_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_ESP_BOX_INTERRUPT_STACK_SIZE, + .priority = CONFIG_ESP_BOX_INTERRUPT_PRIORITY, + .core_id = CONFIG_ESP_BOX_INTERRUPT_CORE_ID}}}; // button std::atomic boot_button_initialized_{false}; diff --git a/components/esp32-p4-function-ev-board/Kconfig b/components/esp32-p4-function-ev-board/Kconfig index ecc834d42..95f17959b 100644 --- a/components/esp32-p4-function-ev-board/Kconfig +++ b/components/esp32-p4-function-ev-board/Kconfig @@ -27,6 +27,21 @@ menu "ESP32-P4 Function EV Board Configuration" help Size of the stack used for the GPIO interrupt handler task (button, etc.). + config ESP_P4_EV_BOARD_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config ESP_P4_EV_BOARD_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). + config ESP_P4_EV_BOARD_TOUCH_TASK_STACK_SIZE int "Touch polling task stack size (bytes)" default 4096 diff --git a/components/esp32-p4-function-ev-board/include/esp32-p4-function-ev-board.hpp b/components/esp32-p4-function-ev-board/include/esp32-p4-function-ev-board.hpp index 13bb47e1b..207b498c2 100644 --- a/components/esp32-p4-function-ev-board/include/esp32-p4-function-ev-board.hpp +++ b/components/esp32-p4-function-ev-board/include/esp32-p4-function-ev-board.hpp @@ -510,7 +510,9 @@ class Esp32P4FunctionEvBoard : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "p4-ev interrupts", - .stack_size_bytes = CONFIG_ESP_P4_EV_BOARD_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_ESP_P4_EV_BOARD_INTERRUPT_STACK_SIZE, + .priority = CONFIG_ESP_P4_EV_BOARD_INTERRUPT_PRIORITY, + .core_id = CONFIG_ESP_P4_EV_BOARD_INTERRUPT_CORE_ID}}}; // Touch std::shared_ptr> touch_i2c_device_; diff --git a/components/esp32-timer-cam/Kconfig b/components/esp32-timer-cam/Kconfig index e7ddf6466..a4dfceefe 100644 --- a/components/esp32-timer-cam/Kconfig +++ b/components/esp32-timer-cam/Kconfig @@ -4,4 +4,19 @@ menu "Esp32 TimerCam Configuration" default 4096 help Size of the stack used for the interrupt handler. + + config ESP_TIMER_CAM_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config ESP_TIMER_CAM_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/esp32-timer-cam/include/esp32-timer-cam.hpp b/components/esp32-timer-cam/include/esp32-timer-cam.hpp index e3d7a8646..47e4bfc75 100644 --- a/components/esp32-timer-cam/include/esp32-timer-cam.hpp +++ b/components/esp32-timer-cam/include/esp32-timer-cam.hpp @@ -240,7 +240,9 @@ class EspTimerCam : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "esp timer cam interrupts", - .stack_size_bytes = CONFIG_ESP_TIMER_CAM_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_ESP_TIMER_CAM_INTERRUPT_STACK_SIZE, + .priority = CONFIG_ESP_TIMER_CAM_INTERRUPT_PRIORITY, + .core_id = CONFIG_ESP_TIMER_CAM_INTERRUPT_CORE_ID}}}; // LED std::vector led_channels_{{ diff --git a/components/m5stack-tab5/Kconfig b/components/m5stack-tab5/Kconfig index 2630bec3a..b76c0eade 100644 --- a/components/m5stack-tab5/Kconfig +++ b/components/m5stack-tab5/Kconfig @@ -5,7 +5,22 @@ menu "M5Stack Tab5 Configuration" help Size of the stack used for the interrupt handler. Used by the touch callback and other interrupt handlers. - + + config M5STACK_TAB5_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config M5STACK_TAB5_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). + config M5STACK_TAB5_AUDIO_TASK_STACK_SIZE int "Audio task stack size" default 8192 diff --git a/components/m5stack-tab5/include/m5stack-tab5.hpp b/components/m5stack-tab5/include/m5stack-tab5.hpp index dde9de2f3..00710050b 100755 --- a/components/m5stack-tab5/include/m5stack-tab5.hpp +++ b/components/m5stack-tab5/include/m5stack-tab5.hpp @@ -706,7 +706,9 @@ class M5StackTab5 : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "tab5 interrupts", - .stack_size_bytes = CONFIG_M5STACK_TAB5_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_M5STACK_TAB5_INTERRUPT_STACK_SIZE, + .priority = CONFIG_M5STACK_TAB5_INTERRUPT_PRIORITY, + .core_id = CONFIG_M5STACK_TAB5_INTERRUPT_CORE_ID}}}; // Component instances std::shared_ptr> touch_i2c_device_; diff --git a/components/matouch-rotary-display/Kconfig b/components/matouch-rotary-display/Kconfig index d6b3d3e60..ea4ec0691 100644 --- a/components/matouch-rotary-display/Kconfig +++ b/components/matouch-rotary-display/Kconfig @@ -5,4 +5,19 @@ menu "Matouch Rotary Display Configuration" help Size of the stack used for the interrupt handler. Shared by the button callback and the touch callbacks. + + config MATOUCH_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config MATOUCH_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/matouch-rotary-display/include/matouch-rotary-display.hpp b/components/matouch-rotary-display/include/matouch-rotary-display.hpp index f661bc4a8..f12ec8c12 100644 --- a/components/matouch-rotary-display/include/matouch-rotary-display.hpp +++ b/components/matouch-rotary-display/include/matouch-rotary-display.hpp @@ -336,7 +336,9 @@ class MatouchRotaryDisplay : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "matouch interrupts", - .stack_size_bytes = CONFIG_MATOUCH_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_MATOUCH_INTERRUPT_STACK_SIZE, + .priority = CONFIG_MATOUCH_INTERRUPT_PRIORITY, + .core_id = CONFIG_MATOUCH_INTERRUPT_CORE_ID}}}; // button std::atomic button_initialized_{false}; diff --git a/components/motorgo-mini/Kconfig b/components/motorgo-mini/Kconfig index 7a94db5ad..8419f1b64 100644 --- a/components/motorgo-mini/Kconfig +++ b/components/motorgo-mini/Kconfig @@ -5,4 +5,19 @@ menu "MotorGo Mini Configuration" help Size of the stack used for the interrupt handler. Used by the button callback. + + config MOTORGO_MINI_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config MOTORGO_MINI_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/motorgo-mini/include/motorgo-mini.hpp b/components/motorgo-mini/include/motorgo-mini.hpp index 609cb634c..be0975b68 100644 --- a/components/motorgo-mini/include/motorgo-mini.hpp +++ b/components/motorgo-mini/include/motorgo-mini.hpp @@ -505,7 +505,9 @@ class MotorGoMini : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "motorgo mini interrupts", - .stack_size_bytes = CONFIG_MOTORGO_MINI_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_MOTORGO_MINI_INTERRUPT_STACK_SIZE, + .priority = CONFIG_MOTORGO_MINI_INTERRUPT_PRIORITY, + .core_id = CONFIG_MOTORGO_MINI_INTERRUPT_CORE_ID}}}; // button std::atomic button_initialized_{false}; diff --git a/components/qtpy/Kconfig b/components/qtpy/Kconfig index 4e98333f3..cf538df48 100644 --- a/components/qtpy/Kconfig +++ b/components/qtpy/Kconfig @@ -5,4 +5,19 @@ menu "QtPy Configuration" help Size of the stack used for the interrupt handler. Used by the button callback. + + config QTPY_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config QTPY_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/qtpy/include/qtpy.hpp b/components/qtpy/include/qtpy.hpp index 260d8a436..304899498 100644 --- a/components/qtpy/include/qtpy.hpp +++ b/components/qtpy/include/qtpy.hpp @@ -151,10 +151,11 @@ class QtPy : public BaseComponent { .pullup_enabled = true}; // we'll only add each interrupt pin if the initialize method is called - espp::Interrupt interrupts_{ - {.interrupts = {}, - .task_config = {.name = "qtpy interrupts", - .stack_size_bytes = CONFIG_QTPY_INTERRUPT_STACK_SIZE}}}; + espp::Interrupt interrupts_{{.interrupts = {}, + .task_config = {.name = "qtpy interrupts", + .stack_size_bytes = CONFIG_QTPY_INTERRUPT_STACK_SIZE, + .priority = CONFIG_QTPY_INTERRUPT_PRIORITY, + .core_id = CONFIG_QTPY_INTERRUPT_CORE_ID}}}; // button std::atomic button_initialized_{false}; diff --git a/components/seeed-studio-round-display/Kconfig b/components/seeed-studio-round-display/Kconfig index 210f10979..7f8c2e19b 100644 --- a/components/seeed-studio-round-display/Kconfig +++ b/components/seeed-studio-round-display/Kconfig @@ -5,4 +5,19 @@ menu "Seeed Studio Round Display Configuration" help Size of the stack used for the interrupt handler. Used by the touch callback. + + config SEEED_STUDIO_ROUND_DISPLAY_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config SEEED_STUDIO_ROUND_DISPLAY_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/seeed-studio-round-display/include/seeed-studio-round-display.hpp b/components/seeed-studio-round-display/include/seeed-studio-round-display.hpp index d1acc7120..8506e57be 100644 --- a/components/seeed-studio-round-display/include/seeed-studio-round-display.hpp +++ b/components/seeed-studio-round-display/include/seeed-studio-round-display.hpp @@ -303,8 +303,9 @@ class SsRoundDisplay : public espp::BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "round display interrupts", - .stack_size_bytes = - CONFIG_SEEED_STUDIO_ROUND_DISPLAY_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_SEEED_STUDIO_ROUND_DISPLAY_INTERRUPT_STACK_SIZE, + .priority = CONFIG_SEEED_STUDIO_ROUND_DISPLAY_INTERRUPT_PRIORITY, + .core_id = CONFIG_SEEED_STUDIO_ROUND_DISPLAY_INTERRUPT_CORE_ID}}}; // touch std::shared_ptr> touch_i2c_device_; diff --git a/components/smartpanlee-sc01-plus/Kconfig b/components/smartpanlee-sc01-plus/Kconfig index 877f14f56..c313d5f6a 100755 --- a/components/smartpanlee-sc01-plus/Kconfig +++ b/components/smartpanlee-sc01-plus/Kconfig @@ -5,6 +5,21 @@ menu "Smart Panlee SC01 Plus Configuration" help Size of the stack used for the touch interrupt handler task. + config SMARTPANLEE_SC01_PLUS_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config SMARTPANLEE_SC01_PLUS_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). + config SMARTPANLEE_SC01_PLUS_AUDIO_TASK_STACK_SIZE int "Audio task stack size" default 4096 diff --git a/components/smartpanlee-sc01-plus/include/smartpanlee-sc01-plus.hpp b/components/smartpanlee-sc01-plus/include/smartpanlee-sc01-plus.hpp index 8f3d772b9..0497d273f 100755 --- a/components/smartpanlee-sc01-plus/include/smartpanlee-sc01-plus.hpp +++ b/components/smartpanlee-sc01-plus/include/smartpanlee-sc01-plus.hpp @@ -348,7 +348,9 @@ class SmartPanleeSc01Plus : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "sc01+ interrupts", - .stack_size_bytes = CONFIG_SMARTPANLEE_SC01_PLUS_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_SMARTPANLEE_SC01_PLUS_INTERRUPT_STACK_SIZE, + .priority = CONFIG_SMARTPANLEE_SC01_PLUS_INTERRUPT_PRIORITY, + .core_id = CONFIG_SMARTPANLEE_SC01_PLUS_INTERRUPT_CORE_ID}}}; std::shared_ptr> touch_i2c_device_; std::shared_ptr touch_driver_; diff --git a/components/t-deck/Kconfig b/components/t-deck/Kconfig index 69ffa1f29..e718dd779 100644 --- a/components/t-deck/Kconfig +++ b/components/t-deck/Kconfig @@ -5,4 +5,19 @@ menu "T-Deck Configuration" help Size of the stack used for the interrupt handler. Shared by the keyboard callback and the touch callback. + + config TDECK_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 20 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config TDECK_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/t-deck/include/t-deck.hpp b/components/t-deck/include/t-deck.hpp index b27c76d5d..7d8a0e257 100644 --- a/components/t-deck/include/t-deck.hpp +++ b/components/t-deck/include/t-deck.hpp @@ -627,7 +627,8 @@ class TDeck : public BaseComponent { .event_queue_size = 50, .task_config = {.name = "t-deck interrupts", .stack_size_bytes = CONFIG_TDECK_INTERRUPT_STACK_SIZE, - .priority = 20}}}; + .priority = CONFIG_TDECK_INTERRUPT_PRIORITY, + .core_id = CONFIG_TDECK_INTERRUPT_CORE_ID}}}; // keyboard std::shared_ptr> keyboard_i2c_device_{nullptr}; diff --git a/components/t-dongle-s3/Kconfig b/components/t-dongle-s3/Kconfig index 0b437bc48..862fe553e 100644 --- a/components/t-dongle-s3/Kconfig +++ b/components/t-dongle-s3/Kconfig @@ -5,4 +5,19 @@ menu "T-Dongle-S3 Configuration" help Size of the stack used for the interrupt handler. Used by the button callback. + + config T_DONGLE_S3_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config T_DONGLE_S3_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/t-dongle-s3/include/t-dongle-s3.hpp b/components/t-dongle-s3/include/t-dongle-s3.hpp index aa63ff41e..2355a9c6c 100644 --- a/components/t-dongle-s3/include/t-dongle-s3.hpp +++ b/components/t-dongle-s3/include/t-dongle-s3.hpp @@ -300,7 +300,9 @@ class TDongleS3 : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "t-dongle-s3 interrupts", - .stack_size_bytes = CONFIG_T_DONGLE_S3_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_T_DONGLE_S3_INTERRUPT_STACK_SIZE, + .priority = CONFIG_T_DONGLE_S3_INTERRUPT_PRIORITY, + .core_id = CONFIG_T_DONGLE_S3_INTERRUPT_CORE_ID}}}; // button std::atomic button_initialized_{false}; diff --git a/components/ws-s3-geek/Kconfig b/components/ws-s3-geek/Kconfig index e4d3704fd..765b4c073 100644 --- a/components/ws-s3-geek/Kconfig +++ b/components/ws-s3-geek/Kconfig @@ -5,4 +5,19 @@ menu "Waveshare S3 Geek Configuration" help Size of the stack used for the interrupt handler. Used by the button callback. + + config WS_S3_GEEK_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config WS_S3_GEEK_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/ws-s3-geek/include/ws-s3-geek.hpp b/components/ws-s3-geek/include/ws-s3-geek.hpp index 9b2a14cb1..06a49918c 100644 --- a/components/ws-s3-geek/include/ws-s3-geek.hpp +++ b/components/ws-s3-geek/include/ws-s3-geek.hpp @@ -253,7 +253,9 @@ class WsS3Geek : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "ws-s3-geek interrupts", - .stack_size_bytes = CONFIG_WS_S3_GEEK_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_WS_S3_GEEK_INTERRUPT_STACK_SIZE, + .priority = CONFIG_WS_S3_GEEK_INTERRUPT_PRIORITY, + .core_id = CONFIG_WS_S3_GEEK_INTERRUPT_CORE_ID}}}; // button std::atomic button_initialized_{false}; diff --git a/components/ws-s3-lcd-1-47/Kconfig b/components/ws-s3-lcd-1-47/Kconfig index ffed8256f..ea18e44f2 100644 --- a/components/ws-s3-lcd-1-47/Kconfig +++ b/components/ws-s3-lcd-1-47/Kconfig @@ -5,4 +5,19 @@ menu "Waveshare S3 LCD 1.47 Configuration" help Size of the stack used for the interrupt handler. Used by the button callback. + + config WS_S3_LCD_1_47_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config WS_S3_LCD_1_47_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/ws-s3-lcd-1-47/include/ws-s3-lcd-1-47.hpp b/components/ws-s3-lcd-1-47/include/ws-s3-lcd-1-47.hpp index ecc10fad1..1f28c5f25 100644 --- a/components/ws-s3-lcd-1-47/include/ws-s3-lcd-1-47.hpp +++ b/components/ws-s3-lcd-1-47/include/ws-s3-lcd-1-47.hpp @@ -290,7 +290,9 @@ class WsS3Lcd147 : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "ws-s3-lcd-1.47 interrupts", - .stack_size_bytes = CONFIG_WS_S3_LCD_1_47_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_WS_S3_LCD_1_47_INTERRUPT_STACK_SIZE, + .priority = CONFIG_WS_S3_LCD_1_47_INTERRUPT_PRIORITY, + .core_id = CONFIG_WS_S3_LCD_1_47_INTERRUPT_CORE_ID}}}; // button std::atomic button_initialized_{false}; diff --git a/components/ws-s3-touch/Kconfig b/components/ws-s3-touch/Kconfig index 5eb8accf0..bbcf34591 100644 --- a/components/ws-s3-touch/Kconfig +++ b/components/ws-s3-touch/Kconfig @@ -25,4 +25,19 @@ menu "Waveshare ESP32-S3 TouchLCD Configuration" help Size of the stack used for the interrupt handler. Used by the touch callback. + + config WS_S3_TOUCH_INTERRUPT_PRIORITY + int "Interrupt task priority" + default 0 + range 0 25 + help + FreeRTOS priority of the GPIO interrupt handler task (0 = lowest). Raise it + if interrupt callbacks must run promptly relative to other tasks. + + config WS_S3_TOUCH_INTERRUPT_CORE_ID + int "Interrupt task core ID" + default -1 + range -1 1 + help + Core to pin the GPIO interrupt handler task to (-1 = not pinned to any core). endmenu diff --git a/components/ws-s3-touch/include/ws-s3-touch.hpp b/components/ws-s3-touch/include/ws-s3-touch.hpp index ba0bf3bd0..551780800 100644 --- a/components/ws-s3-touch/include/ws-s3-touch.hpp +++ b/components/ws-s3-touch/include/ws-s3-touch.hpp @@ -400,7 +400,9 @@ class WsS3Touch : public BaseComponent { espp::Interrupt interrupts_{ {.interrupts = {}, .task_config = {.name = "ws-s3-touch interrupts", - .stack_size_bytes = CONFIG_WS_S3_TOUCH_INTERRUPT_STACK_SIZE}}}; + .stack_size_bytes = CONFIG_WS_S3_TOUCH_INTERRUPT_STACK_SIZE, + .priority = CONFIG_WS_S3_TOUCH_INTERRUPT_PRIORITY, + .core_id = CONFIG_WS_S3_TOUCH_INTERRUPT_CORE_ID}}}; // button std::atomic boot_button_initialized_{false};