summaryrefslogtreecommitdiff
path: root/src/class/dfu/dfu_rt_device.c
diff options
context:
space:
mode:
authorJeremiah McCarthy <[email protected]>2021-04-05 17:52:33 -0400
committerJeremiah McCarthy <[email protected]>2021-04-05 17:52:33 -0400
commitc39b7b8177acbab23e82fee295d5f3205aa9752c (patch)
tree4b821dba031b4ab6b3ee8af618a96ce506e1b71e /src/class/dfu/dfu_rt_device.c
parentbc2cb99780a0bc0359195a4be8e556f71da5a70b (diff)
Add DFU runtime and mode "class"
With the runtime and mode portions in separate classes, a single application should only be building with one or the other enabled. In some applications both might be desired at build time. The CFG_TUD_DFU_RUNTIME_AND_MODE option creates a DFU class, which asks the application which mode to initialize to. This allows a runtime change between RT and DFU mode, by just reinitializing tusb.
Diffstat (limited to 'src/class/dfu/dfu_rt_device.c')
-rw-r--r--src/class/dfu/dfu_rt_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/dfu/dfu_rt_device.c b/src/class/dfu/dfu_rt_device.c
index 806bfba2e..d1d028d69 100644
--- a/src/class/dfu/dfu_rt_device.c
+++ b/src/class/dfu/dfu_rt_device.c
@@ -26,7 +26,7 @@
#include "tusb_option.h"
-#if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_DFU_RUNTIME)
+#if (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_DFU_RUNTIME) || (TUSB_OPT_DEVICE_ENABLED && CFG_TUD_DFU_RUNTIME_AND_MODE)
#include "dfu_rt_device.h"
#include "device/usbd_pvt.h"