diff --git a/embed/bootloader/main.c b/embed/bootloader/main.c index 3b54fb28e..74445cbcc 100644 --- a/embed/bootloader/main.c +++ b/embed/bootloader/main.c @@ -28,6 +28,8 @@ static const uint8_t * const BOOTLOADER_KEYS[] = { #endif }; +#define USB_IFACE_NUM 0 + static void usb_init_all(void) { static const usb_dev_info_t dev_info = { diff --git a/embed/bootloader/messages.c b/embed/bootloader/messages.c index afb1c8717..e00e8ee14 100644 --- a/embed/bootloader/messages.c +++ b/embed/bootloader/messages.c @@ -450,7 +450,7 @@ int process_msg_FirmwareUpload(uint8_t iface_num, uint32_t msg_size, uint8_t *bu ui_fadeout(); ui_screen_info(secfalse, ¤t_vhdr, ¤t_hdr); ui_fadein(); - send_user_abort(USB_IFACE_NUM, "Firmware install cancelled"); + send_user_abort(iface_num, "Firmware install cancelled"); return -4; } diff --git a/embed/bootloader/messages.h b/embed/bootloader/messages.h index 37b5131e9..e03ef8747 100644 --- a/embed/bootloader/messages.h +++ b/embed/bootloader/messages.h @@ -7,7 +7,6 @@ #define USB_TIMEOUT 100 #define USB_PACKET_SIZE 64 -#define USB_IFACE_NUM 0 #define FIRMWARE_SECTORS_COUNT 13 extern const uint8_t firmware_sectors[FIRMWARE_SECTORS_COUNT];