prusa3d / Prusa-Firmware-MMU

Other
35 stars 19 forks source link

circular_buffer: implement `reset()` #231

Closed gudnimg closed 2 years ago

gudnimg commented 2 years ago

reset() discards any data in the buffer (head == tail). This is more efficient than using pop() to remove one element at a time.

Borrowed from https://github.com/prusa3d/Prusa-Firmware-MMU-Private/pull/209

Change in memory: Flash: -116 bytes SRAM: 0 bytes