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§
Provided Methods§
sourcefn is_all_set<B: BitMaskable + Copy>(&self, bits: B) -> bool
fn is_all_set<B: BitMaskable + Copy>(&self, bits: B) -> bool
True IFF all the bits at the given index/range are set
sourcefn is_any_set<B: BitMaskable + Copy>(&self, bits: B) -> bool
fn is_any_set<B: BitMaskable + Copy>(&self, bits: B) -> bool
True IFF any of the bits at the given index/range are set
sourcefn is_all_clr<B: BitMaskable + Copy>(&self, bits: B) -> bool
fn is_all_clr<B: BitMaskable + Copy>(&self, bits: B) -> bool
True IFF none of the bits at the given index/range are set
sourcefn set_isolated<B: BitMaskable + Copy>(&mut self, _isotoken: Isolated, bits: B)
fn set_isolated<B: BitMaskable + Copy>(&mut self, _isotoken: Isolated, bits: B)
Set the bit(s) at the given index/range
sourcefn set<B: BitMaskable + Copy>(&mut self, bits: B)
fn set<B: BitMaskable + Copy>(&mut self, bits: B)
Set the bit(s) at the given index/range
sourcefn exc_set<B: BitMaskable + Copy>(&mut self, bits: B)
fn exc_set<B: BitMaskable + Copy>(&mut self, bits: B)
Set the bit(s) at the given index/range and clear all others
sourcefn clr_isolated<B: BitMaskable + Copy>(&mut self, _isotoken: Isolated, bits: B)
fn clr_isolated<B: BitMaskable + Copy>(&mut self, _isotoken: Isolated, bits: B)
Clear the bit(s) at the given index/range
sourcefn clr<B: BitMaskable + Copy>(&mut self, bits: B)
fn clr<B: BitMaskable + Copy>(&mut self, bits: B)
Clear the bit at the given index
sourcefn exc_clr<B: BitMaskable + Copy>(&mut self, bits: B)
fn exc_clr<B: BitMaskable + Copy>(&mut self, bits: B)
Clear the bit at the given index and set all others
sourcefn set_or_clr<B: BitMaskable + Copy>(&mut self, bits: B, set: bool)
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.)
sourcefn set_to<B: BitMaskable + Copy>(&mut self, bits: B, value: u8)
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.
sourcefn set_to_isolated<B: BitMaskable + Copy>(
&mut self,
_isotoken: Isolated,
bits: B,
value: u8
)
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.
sourcefn get_val<B: BitMaskable + Copy>(&self, bits: B) -> u8
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.