rust-embedded / rust-sysfs-gpio

A Rust Interface to the Linux sysfs GPIO interface (https://www.kernel.org/doc/Documentation/gpio/sysfs.txt)
Apache License 2.0
383 stars 45 forks source link

Add missing set_direction in main example. #57

Closed pheki closed 4 years ago

pheki commented 4 years ago

Was getting an "Operation not permitted" and realized the example code wasn't setting the direction. Actually, the use statement was already there, printing a friendly warning:

use sysfs_gpio::{Direction, Pin};

Thanks!

rust-highfive commented 4 years ago

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @nastevens (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

nastevens commented 4 years ago

D'oh! Thanks for the fix @pheki!