Moved ring buffer to it's own struct

This commit is contained in:
2019-08-02 17:13:53 +02:00
parent 51a9d30c0a
commit b90da9bd9c
3 changed files with 31 additions and 34 deletions

View File

@@ -176,6 +176,13 @@ class Hardware {
}
};
template <typename data_t, uint8_t Size>
struct RingBuffer {
uint8_t head;
uint8_t tail;
data_t buf[Size];
};
} // namespace detail
} // namespace uart