Skip to content

Commit 431d239

Browse files
committed
Switched can helper to a ringbuffer
1 parent 9dc3359 commit 431d239

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

klib/io/bus/can.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
#include <cstdint>
55

6-
#include <klib/queue.hpp>
6+
#include <klib/ringbuffer.hpp>
77

88
namespace klib::io::can {
99
// max data size for the 11/29 bit can frame
@@ -47,9 +47,9 @@ namespace klib::io::can {
4747
template <typename Can, uint32_t TxSize = 32, uint32_t RxSize = 32>
4848
class helper {
4949
protected:
50-
// queues to store the data
51-
static inline queue<can::frame, TxSize, queue_optimization::read> transmit;
52-
static inline queue<can::frame, RxSize, queue_optimization::write> receive;
50+
// ringbuffers to store the data
51+
static inline ringbuffer<can::frame, TxSize> transmit;
52+
static inline ringbuffer<can::frame, RxSize> receive;
5353

5454
// flag if we are already transmitting
5555
static inline bool is_sending = false;

0 commit comments

Comments
 (0)