[−][src]Function gpio_utils::export::export
pub fn export(pin_config: &PinConfig, symlink_root: Option<&str>) -> Result<()>
Export the pin specified in the provided config
Exporting a pin (in this context) involves, a few different actions:
- The GPIO pin itself is exported (via /sys/class/gpio/export)
- For each GPIO name/alias, a symlink is created from
/var/run/gpio/<name>
->/sys/class/gpio<num>
.
If the GPIO is already exported, this function will continue without an error as the desired end state is achieved.