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

bootloader: add SelfTest

This commit is contained in:
Pavol Rusnak 2017-06-29 17:31:23 +02:00
parent 3c0a9c2a87
commit 2bf807878d
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
5 changed files with 8 additions and 1 deletions

View File

@ -318,6 +318,10 @@ static void hid_rx_callback(usbd_device *dev, uint8_t ep)
send_msg_success(dev);
return;
}
if (msg_id == 0x0020) { // SelfTest message (id 32)
send_msg_success(dev);
return;
}
}
if (flash_state == STATE_OPEN) {

View File

@ -140,6 +140,7 @@ SimpleSignTx skip_message:true
FirmwareErase skip_message:true
FirmwareRequest skip_message:true
FirmwareUpload skip_message:true
SelfTest skip_message:true
# used only in debug firmware

View File

@ -42,6 +42,7 @@ typedef enum _MessageType {
MessageType_MessageType_ButtonAck = 27,
MessageType_MessageType_GetAddress = 29,
MessageType_MessageType_Address = 30,
MessageType_MessageType_SelfTest = 32,
MessageType_MessageType_BackupDevice = 34,
MessageType_MessageType_EntropyRequest = 35,
MessageType_MessageType_EntropyAck = 36,

View File

@ -22,6 +22,7 @@
{ 'n', 'i', MessageType_MessageType_ApplySettings, ApplySettings_fields, (void (*)(void *)) fsm_msgApplySettings },
// Message ButtonAck is used in tiny mode
{ 'n', 'i', MessageType_MessageType_GetAddress, GetAddress_fields, (void (*)(void *)) fsm_msgGetAddress },
// Message SelfTest is used in bootloader mode only
{ 'n', 'i', MessageType_MessageType_BackupDevice, BackupDevice_fields, (void (*)(void *)) fsm_msgBackupDevice },
{ 'n', 'i', MessageType_MessageType_EntropyAck, EntropyAck_fields, (void (*)(void *)) fsm_msgEntropyAck },
{ 'n', 'i', MessageType_MessageType_SignMessage, SignMessage_fields, (void (*)(void *)) fsm_msgSignMessage },

@ -1 +1 @@
Subproject commit 68f5246e2f6e8a7265c297b05958df4e2b2b2ad9
Subproject commit c2a40f4b675ed3bf137360a6fa22ff72775f38ff