SPI refactoring #80

Merged
meierj merged 35 commits from mueller/spi-cache-spi-dev-in-com-if into develop 2022-05-11 16:28:09 +02:00
Showing only changes of commit dafcaa6007 - Show all commits

View File

@ -8,7 +8,7 @@ class SourceSequenceCounter {
uint16_t sequenceCount = 0; uint16_t sequenceCount = 0;
public: public:
SourceSequenceCounter() : sequenceCount(0) {} SourceSequenceCounter(uint16_t initialSequenceCount = 0) : sequenceCount(initialSequenceCount) {}
void increment() { void increment() {
sequenceCount = (sequenceCount + 1) % (SpacePacketBase::LIMIT_SEQUENCE_COUNT); sequenceCount = (sequenceCount + 1) % (SpacePacketBase::LIMIT_SEQUENCE_COUNT);
} }
@ -31,6 +31,7 @@ class SourceSequenceCounter {
sequenceCount = newCount; sequenceCount = newCount;
return *this; return *this;
} }
operator uint16_t() { return this->get(); } operator uint16_t() { return this->get(); }
}; };