circuits_uart_midi_framing v0.1.0 Circuits.UART.Framing.MIDI.Buffer

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

Link to this type

t()

t() :: %Circuits.UART.Framing.MIDI.Buffer{buffer: binary()}

Link to this section Functions

Link to this function

append(buffer, data)

append(t(), binary()) :: t()

Apend new data onto the end of the buffer.

Link to this function

empty?(buffer)

empty?(t()) :: boolean()

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()

init() :: t()

Initialise a new empty buffer.