Type Alias nrf52840_pac::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>, FI: Into<N>,

source

pub const WIDTH: u8 = WI

Field width

source

pub const OFFSET: u8 = OF

Field offset

source§

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

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