pub type R = crate::R<GADPCTLrs>;
pub type W = crate::W<GADPCTLrs>;
pub type PRBDSCHG_R = crate::FieldReader;
pub type PRBDSCHG_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PRBDELTA_R = crate::FieldReader;
pub type PRBDELTA_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type PRBPER_R = crate::FieldReader;
pub type PRBPER_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
pub type RTIM_R = crate::FieldReader<u16>;
pub type ENAPRB_R = crate::BitReader;
pub type ENAPRB_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ENASNS_R = crate::BitReader;
pub type ENASNS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADPRST_R = crate::BitReader;
pub type ADPEN_R = crate::BitReader;
pub type ADPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADPPRBIF_R = crate::BitReader;
pub type ADPPRBIF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADPSNSIF_R = crate::BitReader;
pub type ADPSNSIF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADPTOIF_R = crate::BitReader;
pub type ADPTOIF_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADPPRBIM_R = crate::BitReader;
pub type ADPPRBIM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADPSNSIM_R = crate::BitReader;
pub type ADPSNSIM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type ADPTOIM_R = crate::BitReader;
pub type ADPTOIM_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type AR_R = crate::FieldReader;
pub type AR_W<'a, REG> = crate::FieldWriter<'a, REG, 2>;
impl R {
#[inline(always)]
pub fn prbdschg(&self) -> PRBDSCHG_R {
PRBDSCHG_R::new((self.bits & 3) as u8)
}
#[inline(always)]
pub fn prbdelta(&self) -> PRBDELTA_R {
PRBDELTA_R::new(((self.bits >> 2) & 3) as u8)
}
#[inline(always)]
pub fn prbper(&self) -> PRBPER_R {
PRBPER_R::new(((self.bits >> 4) & 3) as u8)
}
#[inline(always)]
pub fn rtim(&self) -> RTIM_R {
RTIM_R::new(((self.bits >> 6) & 0x07ff) as u16)
}
#[inline(always)]
pub fn enaprb(&self) -> ENAPRB_R {
ENAPRB_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn enasns(&self) -> ENASNS_R {
ENASNS_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn adprst(&self) -> ADPRST_R {
ADPRST_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn adpen(&self) -> ADPEN_R {
ADPEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn adpprbif(&self) -> ADPPRBIF_R {
ADPPRBIF_R::new(((self.bits >> 21) & 1) != 0)
}
#[inline(always)]
pub fn adpsnsif(&self) -> ADPSNSIF_R {
ADPSNSIF_R::new(((self.bits >> 22) & 1) != 0)
}
#[inline(always)]
pub fn adptoif(&self) -> ADPTOIF_R {
ADPTOIF_R::new(((self.bits >> 23) & 1) != 0)
}
#[inline(always)]
pub fn adpprbim(&self) -> ADPPRBIM_R {
ADPPRBIM_R::new(((self.bits >> 24) & 1) != 0)
}
#[inline(always)]
pub fn adpsnsim(&self) -> ADPSNSIM_R {
ADPSNSIM_R::new(((self.bits >> 25) & 1) != 0)
}
#[inline(always)]
pub fn adptoim(&self) -> ADPTOIM_R {
ADPTOIM_R::new(((self.bits >> 26) & 1) != 0)
}
#[inline(always)]
pub fn ar(&self) -> AR_R {
AR_R::new(((self.bits >> 27) & 3) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GADPCTL")
.field("prbdschg", &self.prbdschg())
.field("prbdelta", &self.prbdelta())
.field("prbper", &self.prbper())
.field("rtim", &self.rtim())
.field("enaprb", &self.enaprb())
.field("enasns", &self.enasns())
.field("adprst", &self.adprst())
.field("adpen", &self.adpen())
.field("adpprbif", &self.adpprbif())
.field("adpsnsif", &self.adpsnsif())
.field("adptoif", &self.adptoif())
.field("adpprbim", &self.adpprbim())
.field("adpsnsim", &self.adpsnsim())
.field("adptoim", &self.adptoim())
.field("ar", &self.ar())
.finish()
}
}
impl W {
#[inline(always)]
pub fn prbdschg(&mut self) -> PRBDSCHG_W<GADPCTLrs> {
PRBDSCHG_W::new(self, 0)
}
#[inline(always)]
pub fn prbdelta(&mut self) -> PRBDELTA_W<GADPCTLrs> {
PRBDELTA_W::new(self, 2)
}
#[inline(always)]
pub fn prbper(&mut self) -> PRBPER_W<GADPCTLrs> {
PRBPER_W::new(self, 4)
}
#[inline(always)]
pub fn enaprb(&mut self) -> ENAPRB_W<GADPCTLrs> {
ENAPRB_W::new(self, 17)
}
#[inline(always)]
pub fn enasns(&mut self) -> ENASNS_W<GADPCTLrs> {
ENASNS_W::new(self, 18)
}
#[inline(always)]
pub fn adpen(&mut self) -> ADPEN_W<GADPCTLrs> {
ADPEN_W::new(self, 20)
}
#[inline(always)]
pub fn adpprbif(&mut self) -> ADPPRBIF_W<GADPCTLrs> {
ADPPRBIF_W::new(self, 21)
}
#[inline(always)]
pub fn adpsnsif(&mut self) -> ADPSNSIF_W<GADPCTLrs> {
ADPSNSIF_W::new(self, 22)
}
#[inline(always)]
pub fn adptoif(&mut self) -> ADPTOIF_W<GADPCTLrs> {
ADPTOIF_W::new(self, 23)
}
#[inline(always)]
pub fn adpprbim(&mut self) -> ADPPRBIM_W<GADPCTLrs> {
ADPPRBIM_W::new(self, 24)
}
#[inline(always)]
pub fn adpsnsim(&mut self) -> ADPSNSIM_W<GADPCTLrs> {
ADPSNSIM_W::new(self, 25)
}
#[inline(always)]
pub fn adptoim(&mut self) -> ADPTOIM_W<GADPCTLrs> {
ADPTOIM_W::new(self, 26)
}
#[inline(always)]
pub fn ar(&mut self) -> AR_W<GADPCTLrs> {
AR_W::new(self, 27)
}
}
pub struct GADPCTLrs;
impl crate::RegisterSpec for GADPCTLrs {
type Ux = u32;
}
impl crate::Readable for GADPCTLrs {}
impl crate::Writable for GADPCTLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for GADPCTLrs {
const RESET_VALUE: u32 = 0x0200_0400;
}