pub type R = crate::R<GOTGCTLrs>;
pub type W = crate::W<GOTGCTLrs>;
pub type SRQSCS_R = crate::BitReader;
pub type SRQ_R = crate::BitReader;
pub type SRQ_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HNGSCS_R = crate::BitReader;
pub type HNPRQ_R = crate::BitReader;
pub type HNPRQ_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type HSHNPEN_R = crate::BitReader;
pub type HSHNPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type DHNPEN_R = crate::BitReader;
pub type DHNPEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type CIDSTS_R = crate::BitReader;
pub type DBCT_R = crate::BitReader;
pub type ASVLD_R = crate::BitReader;
pub type BSVLD_R = crate::BitReader;
impl R {
#[inline(always)]
pub fn srqscs(&self) -> SRQSCS_R {
SRQSCS_R::new((self.bits & 1) != 0)
}
#[inline(always)]
pub fn srq(&self) -> SRQ_R {
SRQ_R::new(((self.bits >> 1) & 1) != 0)
}
#[inline(always)]
pub fn hngscs(&self) -> HNGSCS_R {
HNGSCS_R::new(((self.bits >> 8) & 1) != 0)
}
#[inline(always)]
pub fn hnprq(&self) -> HNPRQ_R {
HNPRQ_R::new(((self.bits >> 9) & 1) != 0)
}
#[inline(always)]
pub fn hshnpen(&self) -> HSHNPEN_R {
HSHNPEN_R::new(((self.bits >> 10) & 1) != 0)
}
#[inline(always)]
pub fn dhnpen(&self) -> DHNPEN_R {
DHNPEN_R::new(((self.bits >> 11) & 1) != 0)
}
#[inline(always)]
pub fn cidsts(&self) -> CIDSTS_R {
CIDSTS_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn dbct(&self) -> DBCT_R {
DBCT_R::new(((self.bits >> 17) & 1) != 0)
}
#[inline(always)]
pub fn asvld(&self) -> ASVLD_R {
ASVLD_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn bsvld(&self) -> BSVLD_R {
BSVLD_R::new(((self.bits >> 19) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GOTGCTL")
.field("srqscs", &self.srqscs())
.field("srq", &self.srq())
.field("hngscs", &self.hngscs())
.field("hnprq", &self.hnprq())
.field("hshnpen", &self.hshnpen())
.field("dhnpen", &self.dhnpen())
.field("cidsts", &self.cidsts())
.field("dbct", &self.dbct())
.field("asvld", &self.asvld())
.field("bsvld", &self.bsvld())
.finish()
}
}
impl W {
#[inline(always)]
pub fn srq(&mut self) -> SRQ_W<GOTGCTLrs> {
SRQ_W::new(self, 1)
}
#[inline(always)]
pub fn hnprq(&mut self) -> HNPRQ_W<GOTGCTLrs> {
HNPRQ_W::new(self, 9)
}
#[inline(always)]
pub fn hshnpen(&mut self) -> HSHNPEN_W<GOTGCTLrs> {
HSHNPEN_W::new(self, 10)
}
#[inline(always)]
pub fn dhnpen(&mut self) -> DHNPEN_W<GOTGCTLrs> {
DHNPEN_W::new(self, 11)
}
}
pub struct GOTGCTLrs;
impl crate::RegisterSpec for GOTGCTLrs {
type Ux = u32;
}
impl crate::Readable for GOTGCTLrs {}
impl crate::Writable for GOTGCTLrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for GOTGCTLrs {
const RESET_VALUE: u32 = 0x0800;
}