pub struct AdvancedShiftRegister<const N: usize, OP: OutputPin> {
pub shifters: [u8; N],
/* private fields */
}Fields§
§shifters: [u8; N]Shifter data (currently set bits)
Implementations§
Source§impl<const N: usize, OP: OutputPin> AdvancedShiftRegister<N, OP>
impl<const N: usize, OP: OutputPin> AdvancedShiftRegister<N, OP>
pub fn new(data_pin: OP, clk_pin: OP, latch_pin: OP, default_val: u8) -> Self
Sourcepub fn get_shifter_mut(&mut self, i: usize) -> ShifterValue
pub fn get_shifter_mut(&mut self, i: usize) -> ShifterValue
Get wrapper for value of one shifter register (for easy modyfing)
Sourcepub fn get_pin_mut(&mut self, i: usize, bit: u8, auto_shift: bool) -> ShifterPin
pub fn get_pin_mut(&mut self, i: usize, bit: u8, auto_shift: bool) -> ShifterPin
Get wrapper for one bit of specifed shifter register (with embedded_hal digitalpin trait)
Sourcepub fn get_shifter_range_mut(
&mut self,
range: Range<usize>,
) -> ShifterValueRange
pub fn get_shifter_range_mut( &mut self, range: Range<usize>, ) -> ShifterValueRange
Get wrapper for range of shifter registers (for easy modyfing of multiple registers at the same time)
Sourcepub fn update_shifters(&mut self)
pub fn update_shifters(&mut self)
Push stored shifters data onto shifter registers
Auto Trait Implementations§
impl<const N: usize, OP> Freeze for AdvancedShiftRegister<N, OP>
impl<const N: usize, OP> RefUnwindSafe for AdvancedShiftRegister<N, OP>
impl<const N: usize, OP> Send for AdvancedShiftRegister<N, OP>
impl<const N: usize, OP> Sync for AdvancedShiftRegister<N, OP>
impl<const N: usize, OP> Unpin for AdvancedShiftRegister<N, OP>
impl<const N: usize, OP> UnsafeUnpin for AdvancedShiftRegister<N, OP>
impl<const N: usize, OP> UnwindSafe for AdvancedShiftRegister<N, OP>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more