Type Alias xmc4200::generic::FieldWriter

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

Write field Proxy

Aliased Type§

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

Implementations§

source§

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

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§

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

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§

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

source

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

Writes raw bits to the field

source§

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

source

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

Writes raw bits to the field

source§

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

source

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

Writes raw bits to the field

source§

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

source

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

Writes raw bits to the field

source§

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

source

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

Writes variant to the field