BrentSeidel / BBS-BBB-Ada

A collection of Ada sources for working with Linux based embedded computers, such as the BeagleBone Black or Raspberry Pi
GNU General Public License v3.0
7 stars 3 forks source link

Moving PWM Controllers #3

Closed BrentSeidel closed 8 years ago

BrentSeidel commented 8 years ago

It appears that Linux reorders the control files for the PWM units each time it boots. The PWM interface was written under the assumption that each PWM controller would always be found in the same place. Since this assumption is not valid, things will need to change to make this work consistently.

BrentSeidel commented 8 years ago

The simplest solution may be to create a subdirectory /links to store symbolic links to the actual PWM devices. Then the set-protections.sh script can figure out which device is where and create the appropriate symbolic links. The Ada software can then use /link/pwm0 .. /link/pwm7. This is not an ideal solution as it creates a dependency on set-protections.sh, but it might work.

BrentSeidel commented 8 years ago

Updates to set-protections.sh were made to create the proper symbolic links. It seems to work. This is not an ideologically pure solution, but is pragmatic. Other updates were made as needed to use the new path names for the PWM devices.