1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 15:38:11 +00:00

coins: Add _Static_assert for Features.coins max_count

This commit is contained in:
Saleem Rashid 2017-08-14 13:42:59 +01:00 committed by Pavol Rusnak
parent e69ef2e75a
commit 7e56a62e8b

View File

@ -20,6 +20,7 @@
#ifndef __COINS_H__
#define __COINS_H__
#include "messages.pb.h"
#include "types.pb.h"
#if DEBUG_LINK
@ -28,6 +29,8 @@
#define COINS_COUNT 8
#endif
_Static_assert(pb_arraysize(Features, coins) >= COINS_COUNT, "Features.coins max_count not large enough");
extern const CoinType coins[COINS_COUNT];
const CoinType *coinByName(const char *name);