Path helpers for the Sysfs backend.
Summary
Functions
The base sysfs path for PWM devices
Path for a specific PWM chip
Path to set/read the duty cycle of an output
Path to enable or disable an output
Path to export an output
Path giving the number of PWM outputs in a specific chip
Path for a specific PWM output in a specific chip
Path to set/read the period of an output
Path to set/read the polarity of an output
Path to unexport an output
Functions
@spec base_path() :: binary()
The base sysfs path for PWM devices
iex> Pwmx.Paths.base_path()
"/sys/class/pwm"
Path for a specific PWM chip
iex> Pwmx.Paths.chip_path("virtualchip0")
"/sys/class/pwm/virtualchip0"
Path to set/read the duty cycle of an output
iex> Pwmx.Paths.duty_cycle_path("virtualchip0", 1)
"/sys/class/pwm/virtualchip0/pwm1/duty_cycle"
Path to enable or disable an output
iex> Pwmx.Paths.enable_path("virtualchip0", 1)
"/sys/class/pwm/virtualchip0/pwm1/enable"
Path to export an output
iex> Pwmx.Paths.export_path("virtualchip0")
"/sys/class/pwm/virtualchip0/export"
Path giving the number of PWM outputs in a specific chip
iex> Pwmx.Paths.npwm_path("virtualchip0")
"/sys/class/pwm/virtualchip0/npwm"
Path for a specific PWM output in a specific chip
iex> Pwmx.Paths.output_path("virtualchip0", 1)
"/sys/class/pwm/virtualchip0/pwm1"
Path to set/read the period of an output
iex> Pwmx.Paths.period_path("virtualchip0", 1)
"/sys/class/pwm/virtualchip0/pwm1/period"
Path to set/read the polarity of an output
iex> Pwmx.Paths.polarity_path("virtualchip0", 1)
"/sys/class/pwm/virtualchip0/pwm1/polarity"
Path to unexport an output
iex> Pwmx.Paths.unexport_path("virtualchip0")
"/sys/class/pwm/virtualchip0/unexport"