Struct avr_oxide::util::datatypes::Volatile

source ·
#[repr(C)]
pub struct Volatile<T>(/* private fields */);
Expand description

Helper newtype representing volatile values (anything that may be modified by hardware or an interrupt service routine.)

Implementations§

source§

impl Volatile<u8>

source

pub const fn zero() -> Self

source

pub const fn effeff() -> Self

source

pub fn snapshot(&self) -> u8

source

pub fn read(&self) -> u8

source

pub fn write(&mut self, val: u8)

source§

impl Volatile<u16>

source

pub const fn zero() -> Self

source

pub fn snapshot(&self) -> u16

source

pub fn read(&self) -> u16

source

pub fn write(&mut self, val: u16)

source

pub fn write_isolated(&mut self, _isotoken: Isolated, val: u16)

source§

impl Volatile<u32>

source

pub const fn zero() -> Self

source

pub fn snapshot(&self) -> u32

source

pub fn read(&self) -> u32

source

pub fn write(&mut self, val: u32)

source

pub fn write_isolated(&mut self, _isotoken: Isolated, val: u32)

source§

impl Volatile<usize>

source

pub const fn zero() -> Self

source

pub fn snapshot(&self) -> usize

source

pub fn read(&self) -> usize

source

pub fn write(&mut self, val: usize)

source

pub fn write_isolated(&mut self, _isotoken: Isolated, val: usize)

Trait Implementations§

source§

impl Add<u16> for Volatile<u16>

§

type Output = u16

The resulting type after applying the + operator.
source§

fn add(self, rhs: u16) -> Self::Output

Performs the + operation. Read more
source§

impl Add<u32> for Volatile<u32>

§

type Output = u32

The resulting type after applying the + operator.
source§

fn add(self, rhs: u32) -> Self::Output

Performs the + operation. Read more
source§

impl Add<u8> for Volatile<u8>

§

type Output = u8

The resulting type after applying the + operator.
source§

fn add(self, rhs: u8) -> Self::Output

Performs the + operation. Read more
source§

impl Add<usize> for Volatile<usize>

§

type Output = usize

The resulting type after applying the + operator.
source§

fn add(self, rhs: usize) -> Self::Output

Performs the + operation. Read more
source§

impl AddAssign<u16> for Volatile<u16>

source§

fn add_assign(&mut self, rhs: u16)

Performs the += operation. Read more
source§

impl AddAssign<u32> for Volatile<u32>

source§

fn add_assign(&mut self, rhs: u32)

Performs the += operation. Read more
source§

impl AddAssign<u8> for Volatile<u8>

source§

fn add_assign(&mut self, rhs: u8)

Performs the += operation. Read more
source§

impl AddAssign<usize> for Volatile<usize>

source§

fn add_assign(&mut self, rhs: usize)

Performs the += operation. Read more
source§

impl BitAnd<u16> for Volatile<u16>

§

type Output = u16

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: u16) -> Self::Output

Performs the & operation. Read more
source§

impl BitAnd<u32> for Volatile<u32>

§

type Output = u32

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: u32) -> Self::Output

Performs the & operation. Read more
source§

impl BitAnd<u8> for Volatile<u8>

§

type Output = u8

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: u8) -> Self::Output

Performs the & operation. Read more
source§

impl BitAnd<usize> for Volatile<usize>

§

type Output = usize

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: usize) -> Self::Output

Performs the & operation. Read more
source§

impl BitAndAssign<u16> for Volatile<u16>

source§

fn bitand_assign(&mut self, rhs: u16)

Performs the &= operation. Read more
source§

impl BitAndAssign<u32> for Volatile<u32>

source§

fn bitand_assign(&mut self, rhs: u32)

Performs the &= operation. Read more
source§

impl BitAndAssign<u8> for Volatile<u8>

source§

fn bitand_assign(&mut self, rhs: u8)

Performs the &= operation. Read more
source§

impl BitAndAssign<usize> for Volatile<usize>

source§

fn bitand_assign(&mut self, rhs: usize)

Performs the &= operation. Read more
source§

impl BitOr<u16> for Volatile<u16>

§

type Output = u16

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: u16) -> Self::Output

Performs the | operation. Read more
source§

impl BitOr<u32> for Volatile<u32>

§

type Output = u32

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: u32) -> Self::Output

Performs the | operation. Read more
source§

impl BitOr<u8> for Volatile<u8>

§

type Output = u8

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: u8) -> Self::Output

Performs the | operation. Read more
source§

impl BitOr<usize> for Volatile<usize>

§

type Output = usize

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: usize) -> Self::Output

Performs the | operation. Read more
source§

impl BitOrAssign<u16> for Volatile<u16>

source§

fn bitor_assign(&mut self, rhs: u16)

Performs the |= operation. Read more
source§

impl BitOrAssign<u32> for Volatile<u32>

source§

fn bitor_assign(&mut self, rhs: u32)

Performs the |= operation. Read more
source§

impl BitOrAssign<u8> for Volatile<u8>

source§

fn bitor_assign(&mut self, rhs: u8)

Performs the |= operation. Read more
source§

impl BitOrAssign<usize> for Volatile<usize>

source§

fn bitor_assign(&mut self, rhs: usize)

Performs the |= operation. Read more
source§

impl BitXor<u16> for Volatile<u16>

§

type Output = u16

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: u16) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXor<u32> for Volatile<u32>

§

type Output = u32

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: u32) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXor<u8> for Volatile<u8>

§

type Output = u8

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: u8) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXor<usize> for Volatile<usize>

§

type Output = usize

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: usize) -> Self::Output

Performs the ^ operation. Read more
source§

impl BitXorAssign<u16> for Volatile<u16>

source§

fn bitxor_assign(&mut self, rhs: u16)

Performs the ^= operation. Read more
source§

impl BitXorAssign<u32> for Volatile<u32>

source§

fn bitxor_assign(&mut self, rhs: u32)

Performs the ^= operation. Read more
source§

impl BitXorAssign<u8> for Volatile<u8>

source§

fn bitxor_assign(&mut self, rhs: u8)

Performs the ^= operation. Read more
source§

impl BitXorAssign<usize> for Volatile<usize>

source§

fn bitxor_assign(&mut self, rhs: usize)

Performs the ^= operation. Read more
source§

impl BoundedIncDec for Volatile<u8>

source§

fn binc_isolated<const BOUND: usize>(&mut self, _isotoken: Isolated)

source§

fn bdec_isolated<const BOUND: usize>(&mut self, _isotoken: Isolated)

source§

fn binc<const BOUND: usize>(&mut self)

source§

fn bdec<const BOUND: usize>(&mut self)

source§

impl BoundedMaths<&Volatile<u8>, u8> for Volatile<u8>

source§

fn bsub_isolated<const BOUND: usize>( &self, _isotoken: Isolated, rhs: &Volatile<u8> ) -> u8

source§

fn bsub<const BOUND: usize>(&self, rhs: T) -> R

source§

impl BoundedMaths<u8, u8> for Volatile<u8>

source§

fn bsub_isolated<const BOUND: usize>(&self, _isotoken: Isolated, rhs: u8) -> u8

source§

fn bsub<const BOUND: usize>(&self, rhs: T) -> R

source§

impl From<u16> for Volatile<u16>

source§

fn from(val: u16) -> Self

Converts to this type from the input type.
source§

impl From<u32> for Volatile<u32>

source§

fn from(val: u32) -> Self

Converts to this type from the input type.
source§

impl From<u8> for Volatile<u8>

source§

fn from(val: u8) -> Self

Converts to this type from the input type.
source§

impl From<usize> for Volatile<usize>

source§

fn from(val: usize) -> Self

Converts to this type from the input type.
source§

impl PartialEq<u16> for Volatile<u16>

source§

fn eq(&self, other: &u16) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u32> for Volatile<u32>

source§

fn eq(&self, other: &u32) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<u8> for Volatile<u8>

source§

fn eq(&self, other: &u8) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq<usize> for Volatile<usize>

source§

fn eq(&self, other: &usize) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Volatile<u16>

source§

fn eq(&self, other: &Volatile<u16>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Volatile<u32>

source§

fn eq(&self, other: &Volatile<u32>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Volatile<u8>

source§

fn eq(&self, other: &Volatile<u8>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialEq for Volatile<usize>

source§

fn eq(&self, other: &Volatile<usize>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Sub<u16> for Volatile<u16>

§

type Output = u16

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u16) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<u32> for Volatile<u32>

§

type Output = u32

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u32) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<u8> for Volatile<u8>

§

type Output = u8

The resulting type after applying the - operator.
source§

fn sub(self, rhs: u8) -> Self::Output

Performs the - operation. Read more
source§

impl Sub<usize> for Volatile<usize>

§

type Output = usize

The resulting type after applying the - operator.
source§

fn sub(self, rhs: usize) -> Self::Output

Performs the - operation. Read more
source§

impl SubAssign<u16> for Volatile<u16>

source§

fn sub_assign(&mut self, rhs: u16)

Performs the -= operation. Read more
source§

impl SubAssign<u32> for Volatile<u32>

source§

fn sub_assign(&mut self, rhs: u32)

Performs the -= operation. Read more
source§

impl SubAssign<u8> for Volatile<u8>

source§

fn sub_assign(&mut self, rhs: u8)

Performs the -= operation. Read more
source§

impl SubAssign<usize> for Volatile<usize>

source§

fn sub_assign(&mut self, rhs: usize)

Performs the -= operation. Read more

Auto Trait Implementations§

§

impl<T> Freeze for Volatile<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for Volatile<T>
where T: RefUnwindSafe,

§

impl<T> Send for Volatile<T>
where T: Send,

§

impl<T> Sync for Volatile<T>
where T: Sync,

§

impl<T> Unpin for Volatile<T>
where T: Unpin,

§

impl<T> UnwindSafe for Volatile<T>
where T: UnwindSafe,

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.