Skip to content

When issuing a read, call_port can try to exit. #66

Open
@critch

Description

@critch

I have a section of code that is trying to handle incoming data till a marker is set and we can start the framing portion. The UART is a USB gadget that is always present, so open always succeeds. Sometimes a Circuits.UART.read(pid, 1000) results in an exit due to an odd issue with timeout or other. The documentation for read/2 is that it returns {:ok, buffer} or {:error, reason}, but does not cover the exit condition. Either this exit should be conditional, or documented.

Here is a link to the problematic line that calls exit.

exit(:port_timed_out)

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