View Source gpio (gpio v0.6.1)
Link to this section Summary
Link to this section Types
-opaque chip()
-type chip_info() :: #{name := string(), label := string(), lines := non_neg_integer()}.
-opaque line_events()
-opaque lines()
Link to this section Functions
-spec close_chip(chip()) -> ok | {error, term()}.
-spec close_line_events(line_events()) -> ok | {error, term()}.
-spec close_lines(lines()) -> ok | {error, term()}.
-spec open_chip(Path) -> {ok, chip()} | {error, term()} when Path :: file:filename_all().
Link to this function
open_line_events(Chip, Offset, HandleFlags, EventFlags, ConsumerLabel)
View Source-spec open_line_events(chip(), Offset, [Flag], [EventFlag], ConsumerLabel) -> {ok, line_events()} | {error, term()} when Offset :: non_neg_integer(), Flag :: active_low | open_drain | open_source, EventFlag :: rising_edge | falling_edge, ConsumerLabel :: string() | binary().
-spec read_lines(lines()) -> {ok, tuple()} | {error, term()}.
-spec write_lines(lines(), tuple()) -> ok | {error, term()}.