Skip to content
This repository was archived by the owner on Dec 24, 2017. It is now read-only.

Load Unload Cape

Aditya Patadia edited this page Dec 12, 2015 · 4 revisions

You can manually load/unload a cape by using following functions of OctalBoneScript.

loadCape(name)

  • provide name of cape you want to load in capemanager
  • this function executes synchronously
  • returns true on success

unloadCape(name)

  • provide name of cape you want to unload from capemanager
  • this function executes synchronously
  • returns true on success

If you want to find available capes, run ls /lib/firmware/ to list all available capes. You should supply the exact string before -00A0.dtbo as argument to above functions.

Example

b = require('octalbonescript');

b.loadCape('cape-univ-hdmi'); // this will load HDMI cape

b.unloadCape('cape-univ-hdmi'); // this will unload HDMI cape and free its pins to be used by something else.

Please note OBS loads cape-univ-hdmi and cape-universaln automatically during startup to make most of the pins available for use as GPIO.

Clone this wiki locally