Skip to content

Commit

Permalink
applications: nrf_desktop: Fix USB stack next builds in release config
Browse files Browse the repository at this point in the history
Change fixes "undefined reference to `usb_wakeup_request'" build error.

Jira: NCSDK-28196

Signed-off-by: Marek Pieta <[email protected]>
  • Loading branch information
MarekPieta authored and anangl committed Jun 27, 2024
1 parent a3e2890 commit caf57a5
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions applications/nrf_desktop/src/modules/usb_state.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,14 @@ static void usb_wakeup(void)
{
int err = 0;

if (IS_ENABLED(CONFIG_DESKTOP_USB_STACK_NEXT) && usb_enabled) {
__ASSERT_NO_MSG(usbd_ctx);
err = usbd_wakeup_request(usbd_ctx);
if (IS_ENABLED(CONFIG_DESKTOP_USB_STACK_NEXT)) {
if (usb_enabled) {
__ASSERT_NO_MSG(usbd_ctx);
err = usbd_wakeup_request(usbd_ctx);
} else {
/* Skip wakeup request. */
return;
}
} else {
__ASSERT_NO_MSG(IS_ENABLED(CONFIG_DESKTOP_USB_STACK_LEGACY));
err = usb_wakeup_request();
Expand Down

0 comments on commit caf57a5

Please sign in to comment.