pub type R = crate::R<GCCFGrs>;
pub type W = crate::W<GCCFGrs>;
pub type PWRDWN_R = crate::BitReader;
pub type PWRDWN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VBUSASEN_R = crate::BitReader;
pub type VBUSASEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type VBUSBSEN_R = crate::BitReader;
pub type VBUSBSEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type SOFOUTEN_R = crate::BitReader;
pub type SOFOUTEN_W<'a, REG> = crate::BitWriter<'a, REG>;
pub type NOVBUSSENS_R = crate::BitReader;
pub type NOVBUSSENS_W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[inline(always)]
pub fn pwrdwn(&self) -> PWRDWN_R {
PWRDWN_R::new(((self.bits >> 16) & 1) != 0)
}
#[inline(always)]
pub fn vbusasen(&self) -> VBUSASEN_R {
VBUSASEN_R::new(((self.bits >> 18) & 1) != 0)
}
#[inline(always)]
pub fn vbusbsen(&self) -> VBUSBSEN_R {
VBUSBSEN_R::new(((self.bits >> 19) & 1) != 0)
}
#[inline(always)]
pub fn sofouten(&self) -> SOFOUTEN_R {
SOFOUTEN_R::new(((self.bits >> 20) & 1) != 0)
}
#[inline(always)]
pub fn novbussens(&self) -> NOVBUSSENS_R {
NOVBUSSENS_R::new(((self.bits >> 21) & 1) != 0)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("GCCFG")
.field("pwrdwn", &self.pwrdwn())
.field("vbusasen", &self.vbusasen())
.field("vbusbsen", &self.vbusbsen())
.field("sofouten", &self.sofouten())
.field("novbussens", &self.novbussens())
.finish()
}
}
impl W {
#[inline(always)]
pub fn pwrdwn(&mut self) -> PWRDWN_W<GCCFGrs> {
PWRDWN_W::new(self, 16)
}
#[inline(always)]
pub fn vbusasen(&mut self) -> VBUSASEN_W<GCCFGrs> {
VBUSASEN_W::new(self, 18)
}
#[inline(always)]
pub fn vbusbsen(&mut self) -> VBUSBSEN_W<GCCFGrs> {
VBUSBSEN_W::new(self, 19)
}
#[inline(always)]
pub fn sofouten(&mut self) -> SOFOUTEN_W<GCCFGrs> {
SOFOUTEN_W::new(self, 20)
}
#[inline(always)]
pub fn novbussens(&mut self) -> NOVBUSSENS_W<GCCFGrs> {
NOVBUSSENS_W::new(self, 21)
}
}
pub struct GCCFGrs;
impl crate::RegisterSpec for GCCFGrs {
type Ux = u32;
}
impl crate::Readable for GCCFGrs {}
impl crate::Writable for GCCFGrs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for GCCFGrs {}