mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-08-01 19:38:33 +00:00
parent
5395c542c1
commit
48627b7f0f
@ -158,6 +158,8 @@ static secbool _send_msg(uint8_t iface_num, uint16_t msg_id,
|
|||||||
msg_send.has_##FIELD = true; \
|
msg_send.has_##FIELD = true; \
|
||||||
msg_send.FIELD = VALUE; \
|
msg_send.FIELD = VALUE; \
|
||||||
}
|
}
|
||||||
|
#define MSG_SEND_ASSIGN_REQUIRED_VALUE(FIELD, VALUE) \
|
||||||
|
{ msg_send.FIELD = VALUE; }
|
||||||
#define MSG_SEND_ASSIGN_STRING(FIELD, VALUE) \
|
#define MSG_SEND_ASSIGN_STRING(FIELD, VALUE) \
|
||||||
{ \
|
{ \
|
||||||
msg_send.has_##FIELD = true; \
|
msg_send.has_##FIELD = true; \
|
||||||
@ -281,9 +283,9 @@ static void send_msg_features(uint8_t iface_num,
|
|||||||
const image_header *const hdr) {
|
const image_header *const hdr) {
|
||||||
MSG_SEND_INIT(Features);
|
MSG_SEND_INIT(Features);
|
||||||
MSG_SEND_ASSIGN_STRING(vendor, "trezor.io");
|
MSG_SEND_ASSIGN_STRING(vendor, "trezor.io");
|
||||||
MSG_SEND_ASSIGN_VALUE(major_version, VERSION_MAJOR);
|
MSG_SEND_ASSIGN_REQUIRED_VALUE(major_version, VERSION_MAJOR);
|
||||||
MSG_SEND_ASSIGN_VALUE(minor_version, VERSION_MINOR);
|
MSG_SEND_ASSIGN_REQUIRED_VALUE(minor_version, VERSION_MINOR);
|
||||||
MSG_SEND_ASSIGN_VALUE(patch_version, VERSION_PATCH);
|
MSG_SEND_ASSIGN_REQUIRED_VALUE(patch_version, VERSION_PATCH);
|
||||||
MSG_SEND_ASSIGN_VALUE(bootloader_mode, true);
|
MSG_SEND_ASSIGN_VALUE(bootloader_mode, true);
|
||||||
MSG_SEND_ASSIGN_STRING(model, "T");
|
MSG_SEND_ASSIGN_STRING(model, "T");
|
||||||
if (vhdr && hdr) {
|
if (vhdr && hdr) {
|
||||||
|
Loading…
Reference in New Issue
Block a user