Circuits.UART.Framing.MIDI.Buffer (circuits_uart_midi_framing v1.0.0)
Implements a buffer for incoming serial data.
Link to this section Summary
Functions
Apend new data onto the end of the buffer.
Indicates whether the buffer is empty or not.
Consume as much of the buffer as possible, splitting it into messages.
Initialise a new empty buffer.
Link to this section Types
@type t() :: %Circuits.UART.Framing.MIDI.Buffer{buffer: binary()}
Link to this section Functions
Link to this function
append(buffer, data)
Apend new data onto the end of the buffer.
Link to this function
empty?(buffer)
Indicates whether the buffer is empty or not.
Link to this function
get_packets(buffer)
Consume as much of the buffer as possible, splitting it into messages.
Link to this function
init()
@spec init() :: t()
Initialise a new empty buffer.