1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

embed/bootloader: move USB_IFACE_NUM to main.c

This commit is contained in:
Pavol Rusnak 2018-02-12 14:42:47 +01:00
parent 0a15b03917
commit 8a409bd99a
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,8 @@ static const uint8_t * const BOOTLOADER_KEYS[] = {
#endif #endif
}; };
#define USB_IFACE_NUM 0
static void usb_init_all(void) { static void usb_init_all(void) {
static const usb_dev_info_t dev_info = { static const usb_dev_info_t dev_info = {

View File

@ -450,7 +450,7 @@ int process_msg_FirmwareUpload(uint8_t iface_num, uint32_t msg_size, uint8_t *bu
ui_fadeout(); ui_fadeout();
ui_screen_info(secfalse, &current_vhdr, &current_hdr); ui_screen_info(secfalse, &current_vhdr, &current_hdr);
ui_fadein(); ui_fadein();
send_user_abort(USB_IFACE_NUM, "Firmware install cancelled"); send_user_abort(iface_num, "Firmware install cancelled");
return -4; return -4;
} }

View File

@ -7,7 +7,6 @@
#define USB_TIMEOUT 100 #define USB_TIMEOUT 100
#define USB_PACKET_SIZE 64 #define USB_PACKET_SIZE 64
#define USB_IFACE_NUM 0
#define FIRMWARE_SECTORS_COUNT 13 #define FIRMWARE_SECTORS_COUNT 13
extern const uint8_t firmware_sectors[FIRMWARE_SECTORS_COUNT]; extern const uint8_t firmware_sectors[FIRMWARE_SECTORS_COUNT];