1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-12 01:18:14 +00:00
trezor-firmware/nem_serialize.h

24 lines
597 B
C
Raw Normal View History

#define serialize_u32(data) + sizeof(uint32_t)
#define serialize_u64(data) + sizeof(uint64_t)
#define serialize_write(data, length) + (length)
if (!nem_can_write(ctx, NEM_SERIALIZE)) {
return false;
}
#undef serialize_u32
#undef serialize_u64
#undef serialize_write
#define serialize_u32(data) nem_write_u32(ctx, (data));
#define serialize_u64(data) nem_write_u64(ctx, (data));
#define serialize_write(data, length) nem_write(ctx, (data), (length));
NEM_SERIALIZE
#undef serialize_u32
#undef serialize_u64
#undef serialize_write
#undef NEM_SERIALIZE