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>
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user