summaryrefslogtreecommitdiff
path: root/py/ringbuf.c
AgeCommit message (Collapse)Author
2024-09-19py/objringio: Add micropython.RingIO() interface for general use.Andrew Leech
This commit adds a new `RingIO` type which exposes the internal ring-buffer code for general use in Python programs. It has the stream interface making it similar to `StringIO` and `BytesIO`, except `RingIO` has a fixed buffer size and is automatically safe when reads and writes are in different threads or an IRQ. This new type is enabled at the "extra features" ROM level. Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
2023-05-01py/ringbuf: Implement put_bytes/get_bytes functions.glenn20
2019-11-21py/ringbuf: Add peek16 method.Jim Mussared
2019-10-01py/ringbuf: Add helpers for put16/get16.Jim Mussared