RingBuffer is ring buffer implementation inspired by post at https://www.embeddedrelated.com/showthread/comp.arch.embedded/77084-1.php
| 9 | // RingBuffer is ring buffer implementation inspired by post at |
| 10 | // https://www.embeddedrelated.com/showthread/comp.arch.embedded/77084-1.php |
| 11 | type RingBuffer struct { |
| 12 | rxbuffer [bufferSize][9]byte |
| 13 | head volatile.Register8 |
| 14 | tail volatile.Register8 |
| 15 | } |
| 16 | |
| 17 | // NewRingBuffer returns a new ring buffer. |
| 18 | func NewRingBuffer() *RingBuffer { |
nothing calls this directly
no outgoing calls
no test coverage detected