On Wed, Feb 21, 2018 at 8:19 PM, James Fitzsimons <[email protected]> wrote: > Hi Robert, > > Thanks so much for your speedy response! > > Just to confirm then - I understand from the comment at the top of that file > "#PWM's change on every bootup:" that my C++ driver code is going to have to > list the contents of each of the epwmss device directories (e.g. > /sys/devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/) to get the > pwmchipXX mapping to use on each boot?
Actually you don't have to fall back to "/sys/class/pwm/pwmchipX" just keep moving down the path: "/sys/devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip*/<here>" PS, borrow what you can from this project, it's a python project with c files doing the low level. https://github.com/adafruit/adafruit-beaglebone-io-python/blob/master/source/c_pwm.c and just watch out for the pwmchip0/pwm1 -> pwmchip0/pwm-0:1 that occurs in all our v4.11.x+ kernels and some of the newest "v4.9.x" based kernels.. (it was done so udev would work on giving the normal user permissions).. Regards, -- Robert Nelson https://rcn-ee.com/ -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CAOCHtYhbzZVJxnbU3T4OcQdxJYG_pFv7_ZCGcmUjhHoQXiMT3Q%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
