pub enum BitOrder {
MsbFirst = 0,
LsbFirst = 1,
}
Expand description
Bit orders.
The bit order determines in what order data is shifted out and shifted in. Select the bit order that’s appropriate for the device you’re communicating with.
MsbFirst
will transfer the most-significant bit first. LsbFirst
will
transfer the least-significant bit first.
The Raspberry Pi currently only supports the MsbFirst
bit order. If you
need the LsbFirst
bit order, you can use the reverse_bits
function
instead to reverse the bit order in software by converting your write
buffer before sending it to the slave device, and your read buffer after
reading any incoming data.
Variants§
Trait Implementations§
source§impl PartialEq for BitOrder
impl PartialEq for BitOrder
impl Copy for BitOrder
impl Eq for BitOrder
impl StructuralPartialEq for BitOrder
Auto Trait Implementations§
impl Freeze for BitOrder
impl RefUnwindSafe for BitOrder
impl Send for BitOrder
impl Sync for BitOrder
impl Unpin for BitOrder
impl UnwindSafe for BitOrder
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