pub type R = crate::R<DCTLrs>;
pub type W = crate::W<DCTLrs>;
pub type RWUSIG_R = crate::BitReader;
pub type RWUSIG_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SDIS_R = crate::BitReader;
pub type SDIS_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type GINSTS_R = crate::BitReader;
pub type GONSTS_R = crate::BitReader;
pub type TCTL_R = crate::FieldReader;
pub type TCTL_W<'a, REG> = crate::FieldWriter<'a, REG, 3>;
pub type SGINAK_R = crate::BitReader;
pub type SGINAK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CGINAK_R = crate::BitReader;
pub type CGINAK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SGONAK_R = crate::BitReader;
pub type SGONAK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CGONAK_R = crate::BitReader;
pub type CGONAK_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type POPRGDNE_R = crate::BitReader;
pub type POPRGDNE_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn rwusig(&self) -> RWUSIG_R {
RWUSIG_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn sdis(&self) -> SDIS_R {
SDIS_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn ginsts(&self) -> GINSTS_R {
GINSTS_R::new(((self.bits >> 2) & 1) != 0)
}
#[inline(always)]
pub fn gonsts(&self) -> GONSTS_R {
GONSTS_R::new(((self.bits >> 3) & 1) != 0)
}
#[inline(always)]
pub fn tctl(&self) -> TCTL_R {
TCTL_R::new(((self.bits >> 4) & 7) as u8)
}
#[inline(always)]
pub fn sginak(&self) -> SGINAK_R {
SGINAK_R::new(((self.bits >> 7) & 1) != 0)
}
#[inline(always)]
pub fn cginak(&self) -> CGINAK_R {
CGINAK_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn sgonak(&self) -> SGONAK_R {
SGONAK_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn cgonak(&self) -> CGONAK_R {
CGONAK_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn poprgdne(&self) -> POPRGDNE_R {
POPRGDNE_R::new(((self.bits >> 11) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("DCTL")
.field("rwusig", &self.rwusig())
.field("sdis", &self.sdis())
.field("ginsts", &self.ginsts())
.field("gonsts", &self.gonsts())
.field("tctl", &self.tctl())
.field("sginak", &self.sginak())
.field("cginak", &self.cginak())
.field("sgonak", &self.sgonak())
.field("cgonak", &self.cgonak())
.field("poprgdne", &self.poprgdne())
.finish()
}
}
impl W {
#[inline(always)]
pub fn rwusig(&mut self) -> RWUSIG_W<DCTLrs> {
RWUSIG_W::new(self, 0)
}
#[inline(always)]
pub fn sdis(&mut self) -> SDIS_W<DCTLrs> {
SDIS_W::new(self, 1)
}
#[inline(always)]
pub fn tctl(&mut self) -> TCTL_W<DCTLrs> {
TCTL_W::new(self, 4)
}
#[inline(always)]
pub fn sginak(&mut self) -> SGINAK_W<DCTLrs> {
SGINAK_W::new(self, 7)
}
#[inline(always)]
pub fn cginak(&mut self) -> CGINAK_W<DCTLrs> {
CGINAK_W::new(self, 8)
}
#[inline(always)]
pub fn sgonak(&mut self) -> SGONAK_W<DCTLrs> {
SGONAK_W::new(self, 9)
}
#[inline(always)]
pub fn cgonak(&mut self) -> CGONAK_W<DCTLrs> {
CGONAK_W::new(self, 10)
}
#[inline(always)]
pub fn poprgdne(&mut self) -> POPRGDNE_W<DCTLrs> {
POPRGDNE_W::new(self, 11)
}
}
pub struct DCTLrs;
impl crate::RegisterSpec for DCTLrs {
type Ux = u32;
}
impl crate::Readable for DCTLrs {}
impl crate::Writable for DCTLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for DCTLrs {}