Struct avr_oxide::hal::generic::datatypes::IOSpaceU8

source ·
pub struct IOSpaceU8<const IOADDR: u8>();
Expand description

A memory location stored within processor I/O space, that we can access more efficiently using the AVR’s I/O specific atomic instructions like sbi and cbi

Implementations§

source§

impl<const IOADDR: u8> IOSpaceU8<IOADDR>

source

pub const fn get() -> Self

source

pub fn set_c<const BIT: u8>(&mut self)

source

pub fn clr_c<const BIT: u8>(&mut self)

source

pub fn is_set_c<const BIT: u8>(&self) -> bool

source

pub fn is_clr_c<const BIT: u8>(&self) -> bool

Trait Implementations§

source§

impl<const IOADDR: u8> BitFieldAccess for IOSpaceU8<IOADDR>

source§

fn read_byte(&self) -> u8

source§

fn write_byte(&mut self, val: u8)

source§

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

True IFF the bit at the given index is 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>(&mut self, _isotoken: Isolated, 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 clr_isolated<B: BitMaskable>(&mut self, _isotoken: Isolated, bits: B)

Clear the bit(s) at the given index/range
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 set<B: BitMaskable + Copy>(&mut self, bits: B)

Set the bit(s) at the given index/range
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<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.

Auto Trait Implementations§

§

impl<const IOADDR: u8> Freeze for IOSpaceU8<IOADDR>

§

impl<const IOADDR: u8> RefUnwindSafe for IOSpaceU8<IOADDR>

§

impl<const IOADDR: u8> Send for IOSpaceU8<IOADDR>

§

impl<const IOADDR: u8> Sync for IOSpaceU8<IOADDR>

§

impl<const IOADDR: u8> Unpin for IOSpaceU8<IOADDR>

§

impl<const IOADDR: u8> UnwindSafe for IOSpaceU8<IOADDR>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.