Userland access to PWM?

Options
Olli Mannisto
Olli Mannisto New Member Posts: 7
There's a guide for setting up permissions to allow userland access to SPI/I2C and GPIO. However PWM seems to require root.. MRAA library does support PWM on UP^2 but it requires root permissions to work properly.

Would there be a way to set up userland access to the PWM like with the other examples?

Comments

  • WereCatf
    WereCatf New Member Posts: 201
    Options
    Right, I had totally forgotten PWM. I can look into it later, but it's probably gonna have to wait until tomorrow.
  • WereCatf
    WereCatf New Member Posts: 201
    Options
    No can do. The Linux-kernel doesn't notify udev when you export a PWM-controller and so there's no sensible method for setting the permissions correctly with udev. There have been some random patches for this that people have tried to get into upstream, but doesn't look like any of them have actually been accepted, and even if they had, the kernel provided by the UP-team is too old to have it.
  • Olli Mannisto
    Olli Mannisto New Member Posts: 7
    Options
    Ok, thanks anyways.

    Too bad I don't know how to make a service for this, otherwise I could start it as root and just pass the desired duty cycle from userland.
Privacy Policy