Type Alias rp2040_pac::generic::FieldWriter

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

Write field Proxy with unsafe bits

Aliased Type§

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

Implementations§

source§

impl<'a, REG, const WI: u8, FI> FieldWriter<'a, REG, WI, FI>
where REG: Writable + RegisterSpec, FI: FieldSpec, REG::Ux: From<FI::Ux>,

source

pub const WIDTH: u8 = WI

Field width

source

pub const fn width(&self) -> u8

Field width

source

pub const fn offset(&self) -> u8

Field offset

source

pub unsafe fn bits(self, value: FI::Ux) -> &'a mut W<REG>

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 W<REG>

Writes variant to the field