#[doc = "Register `UDIEN` reader"]
pub struct R(crate::R<UDIEN_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<UDIEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::convert::From<crate::R<UDIEN_SPEC>> for R {
fn from(reader: crate::R<UDIEN_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `UDIEN` writer"]
pub struct W(crate::W<UDIEN_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<UDIEN_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl core::convert::From<crate::W<UDIEN_SPEC>> for W {
fn from(writer: crate::W<UDIEN_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `SUSPE` reader - <TBD>"]
pub struct SUSPE_R(crate::FieldReader<bool, bool>);
impl SUSPE_R {
pub(crate) fn new(bits: bool) -> Self {
SUSPE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SUSPE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SUSPE` writer - <TBD>"]
pub struct SUSPE_W<'a> {
w: &'a mut W,
}
impl<'a> SUSPE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !0x01) | ((value as u8) & 0x01);
self.w
}
}
#[doc = "Field `SOFE` reader - <TBD>"]
pub struct SOFE_R(crate::FieldReader<bool, bool>);
impl SOFE_R {
pub(crate) fn new(bits: bool) -> Self {
SOFE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for SOFE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SOFE` writer - <TBD>"]
pub struct SOFE_W<'a> {
w: &'a mut W,
}
impl<'a> SOFE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u8) & 0x01) << 2);
self.w
}
}
#[doc = "Field `EORSTE` reader - <TBD>"]
pub struct EORSTE_R(crate::FieldReader<bool, bool>);
impl EORSTE_R {
pub(crate) fn new(bits: bool) -> Self {
EORSTE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EORSTE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EORSTE` writer - <TBD>"]
pub struct EORSTE_W<'a> {
w: &'a mut W,
}
impl<'a> EORSTE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u8) & 0x01) << 3);
self.w
}
}
#[doc = "Field `WAKEUPE` reader - <TBD>"]
pub struct WAKEUPE_R(crate::FieldReader<bool, bool>);
impl WAKEUPE_R {
pub(crate) fn new(bits: bool) -> Self {
WAKEUPE_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for WAKEUPE_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `WAKEUPE` writer - <TBD>"]
pub struct WAKEUPE_W<'a> {
w: &'a mut W,
}
impl<'a> WAKEUPE_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u8) & 0x01) << 4);
self.w
}
}
#[doc = "Field `EORSME` reader - <TBD>"]
pub struct EORSME_R(crate::FieldReader<bool, bool>);
impl EORSME_R {
pub(crate) fn new(bits: bool) -> Self {
EORSME_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for EORSME_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `EORSME` writer - <TBD>"]
pub struct EORSME_W<'a> {
w: &'a mut W,
}
impl<'a> EORSME_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u8) & 0x01) << 5);
self.w
}
}
#[doc = "Field `UPRSME` reader - <TBD>"]
pub struct UPRSME_R(crate::FieldReader<bool, bool>);
impl UPRSME_R {
pub(crate) fn new(bits: bool) -> Self {
UPRSME_R(crate::FieldReader::new(bits))
}
}
impl core::ops::Deref for UPRSME_R {
type Target = crate::FieldReader<bool, bool>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `UPRSME` writer - <TBD>"]
pub struct UPRSME_W<'a> {
w: &'a mut W,
}
impl<'a> UPRSME_W<'a> {
#[doc = r"Sets the field bit"]
#[inline(always)]
pub fn set_bit(self) -> &'a mut W {
self.bit(true)
}
#[doc = r"Clears the field bit"]
#[inline(always)]
pub fn clear_bit(self) -> &'a mut W {
self.bit(false)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bit(self, value: bool) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u8) & 0x01) << 6);
self.w
}
}
impl R {
#[doc = "Bit 0 - <TBD>"]
#[inline(always)]
pub fn suspe(&self) -> SUSPE_R {
SUSPE_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 2 - <TBD>"]
#[inline(always)]
pub fn sofe(&self) -> SOFE_R {
SOFE_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - <TBD>"]
#[inline(always)]
pub fn eorste(&self) -> EORSTE_R {
EORSTE_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - <TBD>"]
#[inline(always)]
pub fn wakeupe(&self) -> WAKEUPE_R {
WAKEUPE_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - <TBD>"]
#[inline(always)]
pub fn eorsme(&self) -> EORSME_R {
EORSME_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - <TBD>"]
#[inline(always)]
pub fn uprsme(&self) -> UPRSME_R {
UPRSME_R::new(((self.bits >> 6) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - <TBD>"]
#[inline(always)]
pub fn suspe(&mut self) -> SUSPE_W {
SUSPE_W { w: self }
}
#[doc = "Bit 2 - <TBD>"]
#[inline(always)]
pub fn sofe(&mut self) -> SOFE_W {
SOFE_W { w: self }
}
#[doc = "Bit 3 - <TBD>"]
#[inline(always)]
pub fn eorste(&mut self) -> EORSTE_W {
EORSTE_W { w: self }
}
#[doc = "Bit 4 - <TBD>"]
#[inline(always)]
pub fn wakeupe(&mut self) -> WAKEUPE_W {
WAKEUPE_W { w: self }
}
#[doc = "Bit 5 - <TBD>"]
#[inline(always)]
pub fn eorsme(&mut self) -> EORSME_W {
EORSME_W { w: self }
}
#[doc = "Bit 6 - <TBD>"]
#[inline(always)]
pub fn uprsme(&mut self) -> UPRSME_W {
UPRSME_W { w: self }
}
#[doc = "Writes raw bits to the register."]
pub unsafe fn bits(&mut self, bits: u8) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "<TBD>\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [udien](index.html) module"]
pub struct UDIEN_SPEC;
impl crate::RegisterSpec for UDIEN_SPEC {
type Ux = u8;
}
#[doc = "`read()` method returns [udien::R](R) reader structure"]
impl crate::Readable for UDIEN_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [udien::W](W) writer structure"]
impl crate::Writable for UDIEN_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets UDIEN to value 0"]
impl crate::Resettable for UDIEN_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}