UAVCAN_TINY preprocessor option - STM32 test compiles into 41kB in release mode (-Os, LTO)

This commit is contained in:
Pavel Kirienko
2014-04-12 23:28:32 +04:00
parent bbbcf97cae
commit 627dc5f2d9
5 changed files with 66 additions and 10 deletions
@@ -10,6 +10,22 @@
namespace uavcan
{
#if UAVCAN_TINY
class UAVCAN_EXPORT TransferPerfCounter
{
public:
void addTxTransfer() { }
void addRxTransfer() { }
void addError() { }
void addErrors(unsigned) { }
uint64_t getTxTransferCount() const { return 0; }
uint64_t getRxTransferCount() const { return 0; }
uint64_t getErrorCount() const { return 0; }
};
#else
class UAVCAN_EXPORT TransferPerfCounter
{
uint64_t transfers_tx_;
@@ -38,4 +54,6 @@ public:
uint64_t getErrorCount() const { return errors_; }
};
#endif
}