pub type R = crate::R<BGPFCCRrs>;
pub type W = crate::W<BGPFCCRrs>;
pub type CM_R = crate::FieldReader;
pub type CM_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
pub type CCM_R = crate::BitReader;
pub type CCM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type START_R = crate::BitReader;
pub type START_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CS_R = crate::FieldReader;
pub type CS_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
pub type AM_R = crate::FieldReader;
pub type AM_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type AI_R = crate::BitReader;
pub type AI_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type RBS_R = crate::BitReader;
pub type RBS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ALPHA_R = crate::FieldReader;
pub type ALPHA_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
impl R {
#[inline(always)]
pub fn cm(&self) -> CM_R {
CM_R::new((self.bits & 0x0f) as u8)
}
#[inline(always)]
pub fn ccm(&self) -> CCM_R {
CCM_R::new(((self.bits >> 4) & 1) != 0)
}
#[inline(always)]
pub fn start(&self) -> START_R {
START_R::new(((self.bits >> 5) & 1) != 0)
}
#[inline(always)]
pub fn cs(&self) -> CS_R {
CS_R::new(((self.bits >> 8) & 0xff) as u8)
}
#[inline(always)]
pub fn am(&self) -> AM_R {
AM_R::new(((self.bits >> 16) & 3) as u8)
}
#[inline(always)]
pub fn ai(&self) -> AI_R {
AI_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn rbs(&self) -> RBS_R {
RBS_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn alpha(&self) -> ALPHA_R {
ALPHA_R::new(((self.bits >> 24) & 0xff) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("BGPFCCR")
.field("cm", &self.cm())
.field("ccm", &self.ccm())
.field("start", &self.start())
.field("cs", &self.cs())
.field("am", &self.am())
.field("ai", &self.ai())
.field("rbs", &self.rbs())
.field("alpha", &self.alpha())
.finish()
}
}
impl W {
#[inline(always)]
pub fn cm(&mut self) -> CM_W<BGPFCCRrs> {
CM_W::new(self, 0)
}
#[inline(always)]
pub fn ccm(&mut self) -> CCM_W<BGPFCCRrs> {
CCM_W::new(self, 4)
}
#[inline(always)]
pub fn start(&mut self) -> START_W<BGPFCCRrs> {
START_W::new(self, 5)
}
#[inline(always)]
pub fn cs(&mut self) -> CS_W<BGPFCCRrs> {
CS_W::new(self, 8)
}
#[inline(always)]
pub fn am(&mut self) -> AM_W<BGPFCCRrs> {
AM_W::new(self, 16)
}
#[inline(always)]
pub fn ai(&mut self) -> AI_W<BGPFCCRrs> {
AI_W::new(self, 20)
}
#[inline(always)]
pub fn rbs(&mut self) -> RBS_W<BGPFCCRrs> {
RBS_W::new(self, 21)
}
#[inline(always)]
pub fn alpha(&mut self) -> ALPHA_W<BGPFCCRrs> {
ALPHA_W::new(self, 24)
}
}
pub struct BGPFCCRrs;
impl crate::RegisterSpec for BGPFCCRrs {
type Ux = u32;
}
impl crate::Readable for BGPFCCRrs {}
impl crate::Writable for BGPFCCRrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for BGPFCCRrs {}