Developer Charles Steinkuehler developed an enormously useful addition to the BeagleBone Black and DT world with his universal cape overlay. Now included by default on the current 3.7 and 3.8 kernels, the code greatly simplifies pin and cape management via simple command-line calls. The toolset can, in some cases, obviate the need to use many types of sysfs calls, some of which you learned earlier in the chapter.
Perform the following steps:
Begin by logging in as the root user and then loading the cape overlay using the following commands:
$ sudo -i # echo cape-universaln > /sys/devices/bone_capemgr.*/slots
This command loads all devices and exports
gpio
. The pins currently default togpio
inputs. However, with the next set of commands, we can easily change their state.Let's consider the example of the
P8_12
pin and run a command to find out its state:# config-pin -q P8.12 P8_12 Mode: gpio Direction:...