Heavy optimizations for ROM/RAM usage in UAVCAN_TINY mode

This commit is contained in:
Pavel Kirienko
2014-04-16 21:11:42 +04:00
parent 4085613d00
commit 87e89fc042
9 changed files with 85 additions and 12 deletions
@@ -298,6 +298,9 @@ public:
TransferBufferManager(IPoolAllocator& allocator)
: TransferBufferManagerImpl(MaxBufSize, allocator)
{
#if UAVCAN_TINY
StaticAssert<(NumStaticBufs == 0)>::check(); // Static buffers in UAVCAN_TINY mode are not allowed
#endif
StaticAssert<(MaxBufSize > 0)>::check();
}
};
@@ -305,7 +308,7 @@ public:
template <uint16_t MaxBufSize>
class UAVCAN_EXPORT TransferBufferManager<MaxBufSize, 0> : public TransferBufferManagerImpl
{
StaticTransferBufferManagerEntry<MaxBufSize>* getStaticByIndex(uint16_t index) const
StaticTransferBufferManagerEntry<MaxBufSize>* getStaticByIndex(uint16_t) const
{
return NULL;
}