Trait avr_oxide::util::datatypes::BitFieldAccess

source ·
pub trait BitFieldAccess {
Show 19 methods // Required methods fn read_byte(&self) -> u8; fn write_byte(&mut self, val: u8); // Provided methods fn is_set(&self, bit: BitIndex) -> bool { ... } fn is_all_set<B: BitMaskable + Copy>(&self, bits: B) -> bool { ... } fn is_any_set<B: BitMaskable + Copy>(&self, bits: B) -> bool { ... } fn is_all_clr<B: BitMaskable + Copy>(&self, bits: B) -> bool { ... } fn is_clr(&self, bit: BitIndex) -> bool { ... } fn set_isolated<B: BitMaskable + Copy>( &mut self, _isotoken: Isolated, bits: B ) { ... } fn set<B: BitMaskable + Copy>(&mut self, bits: B) { ... } fn set_all(&mut self) { ... } fn clr_all(&mut self) { ... } fn exc_set<B: BitMaskable + Copy>(&mut self, bits: B) { ... } fn clr_isolated<B: BitMaskable + Copy>( &mut self, _isotoken: Isolated, bits: B ) { ... } fn clr<B: BitMaskable + Copy>(&mut self, bits: B) { ... } fn exc_clr<B: BitMaskable + Copy>(&mut self, bits: B) { ... } fn set_or_clr<B: BitMaskable + Copy>(&mut self, bits: B, set: bool) { ... } fn set_to<B: BitMaskable + Copy>(&mut self, bits: B, value: u8) { ... } fn set_to_isolated<B: BitMaskable + Copy>( &mut self, _isotoken: Isolated, bits: B, value: u8 ) { ... } fn get_val<B: BitMaskable + Copy>(&self, bits: B) -> u8 { ... }
}

Required Methods§

source

fn read_byte(&self) -> u8

source

fn write_byte(&mut self, val: u8)

Provided Methods§

source

fn is_set(&self, bit: BitIndex) -> bool

True IFF the bit at the given index is set

source

fn is_all_set<B: BitMaskable + Copy>(&self, bits: B) -> bool

True IFF all the bits at the given index/range are set

source

fn is_any_set<B: BitMaskable + Copy>(&self, bits: B) -> bool

True IFF any of the bits at the given index/range are set

source

fn is_all_clr<B: BitMaskable + Copy>(&self, bits: B) -> bool

True IFF none of the bits at the given index/range are set

source

fn is_clr(&self, bit: BitIndex) -> bool

True IFF the bit at the given index is clear

source

fn set_isolated<B: BitMaskable + Copy>(&mut self, _isotoken: Isolated, bits: B)

Set the bit(s) at the given index/range

source

fn set<B: BitMaskable + Copy>(&mut self, bits: B)

Set the bit(s) at the given index/range

source

fn set_all(&mut self)

Set all bits of the bitmask to 1

source

fn clr_all(&mut self)

Set all bits of the bitmask to 0

source

fn exc_set<B: BitMaskable + Copy>(&mut self, bits: B)

Set the bit(s) at the given index/range and clear all others

source

fn clr_isolated<B: BitMaskable + Copy>(&mut self, _isotoken: Isolated, bits: B)

Clear the bit(s) at the given index/range

source

fn clr<B: BitMaskable + Copy>(&mut self, bits: B)

Clear the bit at the given index

source

fn exc_clr<B: BitMaskable + Copy>(&mut self, bits: B)

Clear the bit at the given index and set all others

source

fn set_or_clr<B: BitMaskable + Copy>(&mut self, bits: B, set: bool)

Set or clear the bit(s) at the given index/range depending on the set parameter (true = set the bit, false = clear it.)

source

fn set_to<B: BitMaskable + Copy>(&mut self, bits: B, value: u8)

Set the bit(s) at the given index/range to the bitwise value given.

source

fn set_to_isolated<B: BitMaskable + Copy>( &mut self, _isotoken: Isolated, bits: B, value: u8 )

Set the bit(s) at the given index/range to the bitwise value given.

source

fn get_val<B: BitMaskable + Copy>(&self, bits: B) -> u8

Return the bit(s) at the given index/range as a binary value.

Object Safety§

This trait is not object safe.

Implementors§