Type Alias avr_device::generic::FieldWriter

source ·
pub type FieldWriter<'a, U, REG, N, FI, const WI: u8, const O: u8> = FieldWriterRaw<'a, U, REG, N, FI, Unsafe, WI, O>;
Expand description

Write field Proxy with unsafe bits

Aliased Type§

struct FieldWriter<'a, U, REG, N, FI, const WI: u8, const O: u8> { /* private fields */ }

Implementations§

source§

impl<'a, U, REG, N, FI, const WI: u8, const OF: u8> FieldWriter<'a, U, REG, N, FI, WI, OF>
where REG: Writable + RegisterSpec<Ux = U>, N: From<FI>,

source

pub const WIDTH: u8 = WI

Field width

source§

impl<'a, U, REG, N, FI, const WI: u8, const OF: u8> FieldWriter<'a, U, REG, N, FI, WI, OF>
where REG: Writable + RegisterSpec<Ux = U>, U: RawReg + From<N>, N: From<FI>,

source

pub unsafe fn bits(self, value: N) -> &'a mut REG::Writer

Writes raw bits to the field

§Safety

Passing incorrect value can cause undefined behaviour. See reference manual

source

pub fn variant(self, variant: FI) -> &'a mut REG::Writer

Writes variant to the field