View Source Wafer.DLL.Rx (wafer v1.1.0)

Bytewise reception buffer for our data link layer.

Summary

Functions

Has the reception completed successfully?

Was there an error during reception?

Initialize a new empty buffer reading for receiving.

Receive a byte into the buffer.

Attempt to retrieve the received value from the buffer.

Types

@type t() :: %Wafer.DLL.Rx{buffer: binary(), state: any()}

Functions

@spec complete?(t()) :: boolean()

Has the reception completed successfully?

@spec error?(t()) :: boolean()

Was there an error during reception?

Initialize a new empty buffer reading for receiving.

@spec rx(t(), byte()) :: t()

Receive a byte into the buffer.

@spec value(t()) :: {:ok, any()} | {:error, any()}

Attempt to retrieve the received value from the buffer.