mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-22 22:38:08 +00:00
add Features.model field (set to "1")
This commit is contained in:
parent
f44635a9ca
commit
bc7c66aa76
@ -227,6 +227,7 @@ static void send_msg_features(usbd_device *dev)
|
|||||||
// - patch_version = VERSION_PATCH
|
// - patch_version = VERSION_PATCH
|
||||||
// - bootloader_mode = True
|
// - bootloader_mode = True
|
||||||
// - firmware_present = True/False
|
// - firmware_present = True/False
|
||||||
|
// - model = "1"
|
||||||
if (brand_new_firmware) {
|
if (brand_new_firmware) {
|
||||||
while ( usbd_ep_write_packet(dev, ENDPOINT_ADDRESS_IN,
|
while ( usbd_ep_write_packet(dev, ENDPOINT_ADDRESS_IN,
|
||||||
// header
|
// header
|
||||||
@ -242,8 +243,9 @@ static void send_msg_features(usbd_device *dev)
|
|||||||
"\x20" VERSION_PATCH_CHAR
|
"\x20" VERSION_PATCH_CHAR
|
||||||
"\x28" "\x01"
|
"\x28" "\x01"
|
||||||
"\x90\x01" "\x00"
|
"\x90\x01" "\x00"
|
||||||
|
"\xaa" "\x01" "1"
|
||||||
// padding
|
// padding
|
||||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||||
, 64) != 64) {}
|
, 64) != 64) {}
|
||||||
} else {
|
} else {
|
||||||
while ( usbd_ep_write_packet(dev, ENDPOINT_ADDRESS_IN,
|
while ( usbd_ep_write_packet(dev, ENDPOINT_ADDRESS_IN,
|
||||||
@ -260,8 +262,9 @@ static void send_msg_features(usbd_device *dev)
|
|||||||
"\x20" VERSION_PATCH_CHAR
|
"\x20" VERSION_PATCH_CHAR
|
||||||
"\x28" "\x01"
|
"\x28" "\x01"
|
||||||
"\x90\x01" "\x01"
|
"\x90\x01" "\x01"
|
||||||
|
"\xaa" "\x01" "1"
|
||||||
// padding
|
// padding
|
||||||
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
|
||||||
, 64) != 64) {}
|
, 64) != 64) {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -267,6 +267,7 @@ void fsm_msgGetFeatures(GetFeatures *msg)
|
|||||||
resp->has_passphrase_cached = true; resp->passphrase_cached = session_isPassphraseCached();
|
resp->has_passphrase_cached = true; resp->passphrase_cached = session_isPassphraseCached();
|
||||||
resp->has_needs_backup = true; resp->needs_backup = storage_needsBackup();
|
resp->has_needs_backup = true; resp->needs_backup = storage_needsBackup();
|
||||||
resp->has_flags = true; resp->flags = storage_getFlags();
|
resp->has_flags = true; resp->flags = storage_getFlags();
|
||||||
|
resp->has_model = true; strlcpy(resp->model, "1", sizeof(resp->model));
|
||||||
msg_write(MessageType_MessageType_Features, resp);
|
msg_write(MessageType_MessageType_Features, resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@ Features.label max_size:33
|
|||||||
Features.coins max_count:15
|
Features.coins max_count:15
|
||||||
Features.revision max_size:20
|
Features.revision max_size:20
|
||||||
Features.bootloader_hash max_size:32
|
Features.bootloader_hash max_size:32
|
||||||
|
Features.model max_size:17
|
||||||
|
|
||||||
ApplySettings.language max_size:17
|
ApplySettings.language max_size:17
|
||||||
ApplySettings.label max_size:33
|
ApplySettings.label max_size:33
|
||||||
|
2
vendor/trezor-common
vendored
2
vendor/trezor-common
vendored
@ -1 +1 @@
|
|||||||
Subproject commit dc181b97b864cc667a11f7a82f2ef43eedb585a4
|
Subproject commit 8e96b42260b84e1e0f0b00a5e528d19258c57031
|
Loading…
Reference in New Issue
Block a user