shift-register-driver 0.1.1

Platform agnostic driver for shift register's built using the embedded-hal
Documentation
  • Coverage
  • 100%
    68 out of 68 items documented0 out of 65 items with examples
  • Size
  • Source code size: 20.08 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 4.81 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • JoshMcguigan/shift-register-driver
    7 8 3
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JoshMcguigan

shift-register-driver Docs Docs

Platform agnostic driver for shift register's built using the embedded-hal

What works

  • Controlling outputs through serial-in parallel-out shift registers with 8 outputs
  • Chaining shift registers up to 128 outputs

TODO

  • Add parallel-out serial-in shift register support

Example

    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();

License

Licensed under either of

at your option.

Contribution

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.