Function unexport

Source
pub fn unexport(
    pin_config: &PinConfig,
    symlink_root: Option<&str>,
) -> Result<()>
Expand description

Unexport the pin specified in the provided config

Unexporting a config (in this context) involves a few different actions:

  1. For each GPIO name/alias, the corresponding symlink is remvoed from /var/run/gpio/<name> (or an alternate configured symlink_root).
  2. The GPIO pin istself is unexported (vai /sys/class/gpio/unexport)

If the GPIO was already unexported, this function will continue without an error as the desired end state is achieved.