Struct avr_device::generic::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: ?Sized> Freeze for W<REG>
where <REG as RegisterSpec>::Ux: Freeze,

§

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

§

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

§

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

§

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

§

impl<REG: ?Sized> UnwindSafe for W<REG>
where REG: UnwindSafe, <REG as RegisterSpec>::Ux: 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.