Pwmx.Enumerator (Pwmx v0.1.0)

Copy Markdown View Source

Convenience module to enumerate available PWM outputs. The sysfs interface can report a number of pwm pins, but it is not guaranteed that all of them will be able to be exported.

Summary

Functions

Lists available outputs by opening (and closing) each of them. Accepts an optional backend instance, defaulting to the application-supervised Pwmx.Backend.

Functions

list_available_outputs(backend \\ Backend)

Lists available outputs by opening (and closing) each of them. Accepts an optional backend instance, defaulting to the application-supervised Pwmx.Backend.

iex> Pwmx.Enumerator.list_available_outputs()
[
  {"virtualchip0", 0},
  {"virtualchip0", 1},
  {"virtualchip0", 2},
  {"virtualchip0", 3},
]