aboutsummaryrefslogtreecommitdiffstats
path: root/src/generic/usb_cdc.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2022-12-19 12:04:54 -0500
committerKevin O'Connor <kevin@koconnor.net>2022-12-30 21:28:32 -0500
commit34fd3f41ea1f819fb43b386334d01c13ffb4f781 (patch)
treee1e2e054011700040a58eb96c7a14f78f81c2fc3 /src/generic/usb_cdc.c
parent806cf233ec238802ce75c1f0a35cf9dcba1644f0 (diff)
downloadkutter-34fd3f41ea1f819fb43b386334d01c13ffb4f781.tar.gz
kutter-34fd3f41ea1f819fb43b386334d01c13ffb4f781.tar.xz
kutter-34fd3f41ea1f819fb43b386334d01c13ffb4f781.zip
usb_cdc: Only call bootloader_request() if CONFIG_HAVE_BOOTLOADER_REQUEST
Check for the build symbol prior to calling bootloader_request(). Enable the build symbol on rp2040, atsam, and atsamd chips. This also enables serial bootloader requsts on rp2040, atsam, and atsamd. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/generic/usb_cdc.c')
-rw-r--r--src/generic/usb_cdc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/generic/usb_cdc.c b/src/generic/usb_cdc.c
index 40ff74ba..143c213f 100644
--- a/src/generic/usb_cdc.c
+++ b/src/generic/usb_cdc.c
@@ -446,6 +446,8 @@ static uint8_t line_control_state;
static void
check_reboot(void)
{
+ if (!CONFIG_HAVE_BOOTLOADER_REQUEST)
+ return;
if (line_coding.dwDTERate == 1200 && !(line_control_state & 0x01))
// A baud of 1200 is an Arduino style request to enter the bootloader
bootloader_request();