mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-13 19:18:56 +00:00
messages: fix size of msg_tiny and add static_assert
This commit is contained in:
parent
559a700fb0
commit
d6f41dba9e
@ -314,7 +314,16 @@ const uint8_t *msg_debug_out_data(void)
|
||||
|
||||
#endif
|
||||
|
||||
CONFIDENTIAL uint8_t msg_tiny[64];
|
||||
CONFIDENTIAL uint8_t msg_tiny[128];
|
||||
_Static_assert(sizeof(msg_tiny) >= sizeof(Cancel), "msg_tiny too tiny");
|
||||
_Static_assert(sizeof(msg_tiny) >= sizeof(Initialize), "msg_tiny too tiny");
|
||||
_Static_assert(sizeof(msg_tiny) >= sizeof(PassphraseAck), "msg_tiny too tiny");
|
||||
_Static_assert(sizeof(msg_tiny) >= sizeof(ButtonAck), "msg_tiny too tiny");
|
||||
_Static_assert(sizeof(msg_tiny) >= sizeof(PinMatrixAck), "msg_tiny too tiny");
|
||||
#if DEBUG_LINK
|
||||
_Static_assert(sizeof(msg_tiny) >= sizeof(DebugLinkDecision), "msg_tiny too tiny");
|
||||
_Static_assert(sizeof(msg_tiny) >= sizeof(DebugLinkGetState), "msg_tiny too tiny");
|
||||
#endif
|
||||
uint16_t msg_tiny_id = 0xFFFF;
|
||||
|
||||
void msg_read_tiny(const uint8_t *buf, int len)
|
||||
|
@ -47,7 +47,7 @@ bool msg_write_common(char type, uint16_t msg_id, const void *msg_ptr);
|
||||
|
||||
void msg_read_tiny(const uint8_t *buf, int len);
|
||||
void msg_debug_read_tiny(const uint8_t *buf, int len);
|
||||
extern uint8_t msg_tiny[64];
|
||||
extern uint8_t msg_tiny[128];
|
||||
extern uint16_t msg_tiny_id;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user