Struct W

Source
pub struct W<REG: RegisterSpec + ?Sized> { /* private fields */ }
Expand description

Register writer.

Used as an argument to the closures in the write and modify methods of the register.

Implementations§

Source§

impl<REG: RegisterSpec> W<REG>

Source

pub unsafe fn bits(&mut self, bits: REG::Ux) -> &mut Self

Writes raw bits to the register.

§Safety

Read datasheet or reference manual to find what values are allowed to pass.

Trait Implementations§

Source§

impl From<W<ACSR_SPEC>> for W

Source§

fn from(writer: W<ACSR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<ADCSRA_SPEC>> for W

Source§

fn from(writer: W<ADCSRA_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<ADCSRB_SPEC>> for W

Source§

fn from(writer: W<ADCSRB_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<ADCSRB_SPEC>> for W

Source§

fn from(writer: W<ADCSRB_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<ADC_SPEC>> for W

Source§

fn from(writer: W<ADC_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<ADMUX_SPEC>> for W

Source§

fn from(writer: W<ADMUX_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<CLKPR_SPEC>> for W

Source§

fn from(writer: W<CLKPR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<DDRB_SPEC>> for W

Source§

fn from(writer: W<DDRB_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<DIDR0_SPEC>> for W

Source§

fn from(writer: W<DIDR0_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<DIDR0_SPEC>> for W

Source§

fn from(writer: W<DIDR0_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<DT1A_SPEC>> for W

Source§

fn from(writer: W<DT1A_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<DT1B_SPEC>> for W

Source§

fn from(writer: W<DT1B_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<DTPS_SPEC>> for W

Source§

fn from(writer: W<DTPS_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<DWDR_SPEC>> for W

Source§

fn from(writer: W<DWDR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<EEAR_SPEC>> for W

Source§

fn from(writer: W<EEAR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<EECR_SPEC>> for W

Source§

fn from(writer: W<EECR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<EEDR_SPEC>> for W

Source§

fn from(writer: W<EEDR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<EXTENDED_SPEC>> for W

Source§

fn from(writer: W<EXTENDED_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<GIFR_SPEC>> for W

Source§

fn from(writer: W<GIFR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<GIMSK_SPEC>> for W

Source§

fn from(writer: W<GIMSK_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<GPIOR0_SPEC>> for W

Source§

fn from(writer: W<GPIOR0_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<GPIOR1_SPEC>> for W

Source§

fn from(writer: W<GPIOR1_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<GPIOR2_SPEC>> for W

Source§

fn from(writer: W<GPIOR2_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<GTCCR_SPEC>> for W

Source§

fn from(writer: W<GTCCR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<GTCCR_SPEC>> for W

Source§

fn from(writer: W<GTCCR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<HIGH_SPEC>> for W

Source§

fn from(writer: W<HIGH_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<LOCKBIT_SPEC>> for W

Source§

fn from(writer: W<LOCKBIT_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<LOW_SPEC>> for W

Source§

fn from(writer: W<LOW_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<MCUCR_SPEC>> for W

Source§

fn from(writer: W<MCUCR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<MCUCR_SPEC>> for W

Source§

fn from(writer: W<MCUCR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<MCUSR_SPEC>> for W

Source§

fn from(writer: W<MCUSR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<OCR0A_SPEC>> for W

Source§

fn from(writer: W<OCR0A_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<OCR0B_SPEC>> for W

Source§

fn from(writer: W<OCR0B_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<OCR1A_SPEC>> for W

Source§

fn from(writer: W<OCR1A_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<OCR1B_SPEC>> for W

Source§

fn from(writer: W<OCR1B_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<OCR1C_SPEC>> for W

Source§

fn from(writer: W<OCR1C_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<OSCCAL_SPEC>> for W

Source§

fn from(writer: W<OSCCAL_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<PCMSK_SPEC>> for W

Source§

fn from(writer: W<PCMSK_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<PINB_SPEC>> for W

Source§

fn from(writer: W<PINB_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<PLLCSR_SPEC>> for W

Source§

fn from(writer: W<PLLCSR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<PORTB_SPEC>> for W

Source§

fn from(writer: W<PORTB_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<PRR_SPEC>> for W

Source§

fn from(writer: W<PRR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<SPMCSR_SPEC>> for W

Source§

fn from(writer: W<SPMCSR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TCCR0A_SPEC>> for W

Source§

fn from(writer: W<TCCR0A_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TCCR0B_SPEC>> for W

Source§

fn from(writer: W<TCCR0B_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TCCR1_SPEC>> for W

Source§

fn from(writer: W<TCCR1_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TCNT0_SPEC>> for W

Source§

fn from(writer: W<TCNT0_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TCNT1_SPEC>> for W

Source§

fn from(writer: W<TCNT1_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TIFR_SPEC>> for W

Source§

fn from(writer: W<TIFR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TIFR_SPEC>> for W

Source§

fn from(writer: W<TIFR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TIMSK_SPEC>> for W

Source§

fn from(writer: W<TIMSK_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<TIMSK_SPEC>> for W

Source§

fn from(writer: W<TIMSK_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<USIBR_SPEC>> for W

Source§

fn from(writer: W<USIBR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<USICR_SPEC>> for W

Source§

fn from(writer: W<USICR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<USIDR_SPEC>> for W

Source§

fn from(writer: W<USIDR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<USISR_SPEC>> for W

Source§

fn from(writer: W<USISR_SPEC>) -> Self

Converts to this type from the input type.
Source§

impl From<W<WDTCR_SPEC>> for W

Source§

fn from(writer: W<WDTCR_SPEC>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

§

impl<REG> Freeze for W<REG>
where <REG as RegisterSpec>::Ux: Freeze, REG: ?Sized,

§

impl<REG> RefUnwindSafe for W<REG>
where <REG as RegisterSpec>::Ux: RefUnwindSafe, REG: RefUnwindSafe + ?Sized,

§

impl<REG> Send for W<REG>
where <REG as RegisterSpec>::Ux: Send, REG: Send + ?Sized,

§

impl<REG> Sync for W<REG>
where <REG as RegisterSpec>::Ux: Sync, REG: Sync + ?Sized,

§

impl<REG> Unpin for W<REG>
where <REG as RegisterSpec>::Ux: Unpin, REG: Unpin + ?Sized,

§

impl<REG> UnwindSafe for W<REG>
where <REG as RegisterSpec>::Ux: UnwindSafe, REG: UnwindSafe + ?Sized,

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>,

Source§

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>,

Source§

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.