MCPcopy
hub / github.com/tinygo-org/tinygo / RingBuffer

Struct RingBuffer

src/machine/usb/hid/buffer.go:11–15  ·  view source on GitHub ↗

RingBuffer is ring buffer implementation inspired by post at https://www.embeddedrelated.com/showthread/comp.arch.embedded/77084-1.php

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected