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

simple mio example #49

Open lthiery opened 6 years ago

lthiery commented 6 years ago

I was trying to use this library without all the tokio stuff and wished there was a mio example. I shared back this example, although it's not fancy and doesn't take args.

Plus, there is something funny happening where the first event is non-sense...

posborne commented 6 years ago

Thanks for the example @lthiery; can you run rustfmt on this? I'll give it a once-over as well in more detail.

mathk commented 5 years ago

bors try

posborne commented 5 years ago

@mathk I haven't made my rounds on this repo to enable bors yet but may be doing some of that tomorrow.

posborne commented 5 years ago

This probably needs a rebase to have a better chance with CI.

mathk commented 5 years ago

I guess you need to feature gate your test: #[cfg(feature = "mio-evented")]

eldruin commented 3 years ago

This would need to be adapted to the updated mio version now. bors try

bors[bot] commented 3 years ago

try

Build failed: