| Crates.io | shift-register-driver |
| lib.rs | shift-register-driver |
| version | 0.1.1 |
| created_at | 2018-07-04 12:34:58.609993+00 |
| updated_at | 2018-07-07 01:55:25.464524+00 |
| description | Platform agnostic driver for shift register's built using the embedded-hal |
| homepage | |
| repository | https://github.com/JoshMcguigan/shift-register-driver |
| max_upload_size | |
| id | 72857 |
| size | 19,576 |
Platform agnostic driver for shift register's built using the embedded-hal
use shift_register_driver::sipo::ShiftRegister;
let shift_register = ShiftRegister::new(clock, latch, data);
{
let mut outputs = shift_register.decompose();
for i in 0..8 {
outputs[i].set_high();
delay.delay_ms(300u32);
}
for i in 0..8 {
outputs[7-i].set_low();
delay.delay_ms(300u32);
}
}
// shift_register.release() can optionally be used when the shift register is no longer needed
// in order to regain ownership of the original GPIO pins
let (clock, latch, data) = shift_register.release();
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.