Struct rppal::gpio::GPIO [] [src]

pub struct GPIO { /* fields omitted */ }

Provides access to the Raspberry Pi GPIO.

Methods

impl GPIO
[src]

Constructs a new GPIO.

When enabled, resets all pins to their original state when GPIO goes out of scope.

Drop methods aren't called when a program is abnormally terminated, for instance when a user presses Ctrl-C, and the SIGINT signal isn't caught. You'll either have to catch those using crates such as simple_signal, or manually call cleanup().

Enabled by default.

Resets all pins to their original state.

Normally, this method is automatically called when GPIO goes out of scope, but you can manually call it to handle early/abnormal termination. After calling this method, any future calls to other methods won't have any result.

Reads the current GPIO pin mode.

Changes the GPIO pin mode to input, output or one of the alternative functions.

Reads the current GPIO pin logic level.

Changes the GPIO pin logic level to high or low.

Enables/disables the built-in GPIO pull-up/pull-down resistors.

Trait Implementations

impl Drop for GPIO
[src]

A method called when the value goes out of scope. Read more