Skip to content

Commit 320bd21

Browse files
MarekPietakapi-no
authored andcommitted
applications: nrf_desktop: Update button_event subscription priority
Change updates button_event subscription priority in the passkey buttons and button simulator modules to let the modules process the event before other application modules. Jira: NCSDK-34374 Signed-off-by: Marek Pieta <[email protected]>
1 parent 1376cb4 commit 320bd21

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

applications/nrf_desktop/src/hw_interface/buttons_sim.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,6 @@ static bool app_event_handler(const struct app_event_header *aeh)
181181

182182
APP_EVENT_LISTENER(MODULE, app_event_handler);
183183
APP_EVENT_SUBSCRIBE(MODULE, module_state_event);
184-
APP_EVENT_SUBSCRIBE(MODULE, button_event);
184+
APP_EVENT_SUBSCRIBE_EARLY(MODULE, button_event);
185185
APP_EVENT_SUBSCRIBE(MODULE, power_down_event);
186186
APP_EVENT_SUBSCRIBE(MODULE, wake_up_event);

applications/nrf_desktop/src/hw_interface/passkey_buttons.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,5 +227,5 @@ static bool app_event_handler(const struct app_event_header *aeh)
227227
}
228228
APP_EVENT_LISTENER(MODULE, app_event_handler);
229229
APP_EVENT_SUBSCRIBE(MODULE, module_state_event);
230-
APP_EVENT_SUBSCRIBE(MODULE, button_event);
230+
APP_EVENT_SUBSCRIBE_EARLY(MODULE, button_event);
231231
APP_EVENT_SUBSCRIBE(MODULE, passkey_req_event);

doc/nrf/releases_and_maturity/releases/release-notes-changelog.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,8 @@ nRF Desktop
314314
This change ensures that subscriptions to both HID boot and HID report protocol mode are not enabled at the same time.
315315
* The :ref:`nrf_desktop_fn_keys` to subscribe for :c:struct:`button_event` as the first subscriber (:c:macro:`APP_EVENT_SUBSCRIBE_FIRST`) by default.
316316
You can disable the :ref:`CONFIG_DESKTOP_FN_KEYS_BUTTON_EVENT_SUBSCRIBE_FIRST <config_desktop_app_options>` Kconfig option to use early subscription (:c:macro:`APP_EVENT_SUBSCRIBE_EARLY`).
317+
* The :ref:`nrf_desktop_passkey` and :ref:`nrf_desktop_buttons_sim` to subscribe for :c:struct:`button_event` as an early subscriber (:c:macro:`APP_EVENT_SUBSCRIBE_EARLY`).
318+
This allows the modules to process the event before other application modules.
317319

318320
nRF Machine Learning (Edge Impulse)
319321
-----------------------------------

0 commit comments

Comments
 (0)