Skip to content

Distinguish reading empty binaries from timeout #33

@pallix

Description

@pallix

Nerves.UART.read returns {:ok, ""} upon timeout. When testing some code I noticed it is possible to use Nervers.UART.write with an empty string ("") and it is possible to read it: {:ok, ""} will also be returned. So it is not possible to distinguish between empty binaries being written and timeout.

I do not need to write empty binaries on the serial but noticed this while using propcheck and tty0tty.

Would it make sense to distinguish timeout and empty binaries? (by returning :timeout for example)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions