Crates.io | drive_74hc595 |
lib.rs | drive_74hc595 |
version | 0.2.0 |
source | src |
created_at | 2023-04-19 17:49:05.62769 |
updated_at | 2024-04-14 15:19:36.101387 |
description | Drive for IC 74HC595 Shift Register |
homepage | |
repository | https://github.com/RecursiveError/drive_74hc595 |
max_upload_size | |
id | 843776 |
size | 7,138 |
library for using IC 74HC595 Shift Register with embedded_hal
first pass the correct pins to struct
let mut drive = ShiftRegister::new(OE, SER, SRCLR, SRCLK, RCLK);
OE and SRCLR can be dummy pins (if this is the case connect the pin of IC OE and SRCLR to GND and VCC respectively)
If you choose to disable these pins, the functions associated with them will not work.
after that call the "begin" function
drive.begin();
now the IC is ready to be used. see more functions in the list below
begin
starts the 74HC595
load
loads an 8bit value to the 74HC595
enable_output
enable output
disable_output
disable the output (operations can still be performed)
output_clear
clean the output
shift_zero
shifts zero once
shift_one
shift one once
shift_zero_times
shifts zero N times
shift_one_times
shift one N times