Skip to content

Commit

Permalink
tinyusb/dfu: Fix build when auto confirm is off
Browse files Browse the repository at this point in the history
Part of the code and data was included only if
USBD_DFU_RESET_AFTER_DOWNLOAD was set.

While package init function used those functions and data
regardless of syscfg value.

package init function is not called from sysinit when
USBD_DFU_RESET_AFTER_DOWNLOAD is not set but code inside is
still there.

Now all code is there and if functionality is not used
package init function will not be called from sysinit.
  • Loading branch information
kasjer committed Oct 11, 2023
1 parent f0152ae commit 8a45d7e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions hw/usb/tinyusb/dfu/src/dfu.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@
*/
#define FIRMWARE_SLOT MYNEWT_VAL(USBD_DFU_SLOT_ID)

#if MYNEWT_VAL(USBD_DFU_RESET_AFTER_DOWNLOAD)

struct os_callout delayed_reset_callout;
struct os_callout auto_confirm_callout;

Expand All @@ -44,8 +42,6 @@ delayed_reset_cb(struct os_event *event)
hal_system_reset();
}

#endif

/*
* DFU callbacks
* Note: alt is used as the partition number, in order to support multiple partitions like FLASH, EEPROM, etc.
Expand Down

0 comments on commit 8a45d7e

Please sign in to comment.