#[doc = "Register `AFEC_IDR` writer"]
pub struct W(crate::W<AFEC_IDR_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<AFEC_IDR_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 From<crate::W<AFEC_IDR_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<AFEC_IDR_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Field `EOC0` writer - End of Conversion Interrupt Disable 0"]
pub struct EOC0_W<'a> {
w: &'a mut W,
}
impl<'a> EOC0_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 u32 & 0x01);
self.w
}
}
#[doc = "Field `EOC1` writer - End of Conversion Interrupt Disable 1"]
pub struct EOC1_W<'a> {
w: &'a mut W,
}
impl<'a> EOC1_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 << 1)) | ((value as u32 & 0x01) << 1);
self.w
}
}
#[doc = "Field `EOC2` writer - End of Conversion Interrupt Disable 2"]
pub struct EOC2_W<'a> {
w: &'a mut W,
}
impl<'a> EOC2_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 u32 & 0x01) << 2);
self.w
}
}
#[doc = "Field `EOC3` writer - End of Conversion Interrupt Disable 3"]
pub struct EOC3_W<'a> {
w: &'a mut W,
}
impl<'a> EOC3_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 u32 & 0x01) << 3);
self.w
}
}
#[doc = "Field `EOC4` writer - End of Conversion Interrupt Disable 4"]
pub struct EOC4_W<'a> {
w: &'a mut W,
}
impl<'a> EOC4_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 u32 & 0x01) << 4);
self.w
}
}
#[doc = "Field `EOC5` writer - End of Conversion Interrupt Disable 5"]
pub struct EOC5_W<'a> {
w: &'a mut W,
}
impl<'a> EOC5_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 u32 & 0x01) << 5);
self.w
}
}
#[doc = "Field `EOC6` writer - End of Conversion Interrupt Disable 6"]
pub struct EOC6_W<'a> {
w: &'a mut W,
}
impl<'a> EOC6_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 u32 & 0x01) << 6);
self.w
}
}
#[doc = "Field `EOC7` writer - End of Conversion Interrupt Disable 7"]
pub struct EOC7_W<'a> {
w: &'a mut W,
}
impl<'a> EOC7_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 << 7)) | ((value as u32 & 0x01) << 7);
self.w
}
}
#[doc = "Field `EOC8` writer - End of Conversion Interrupt Disable 8"]
pub struct EOC8_W<'a> {
w: &'a mut W,
}
impl<'a> EOC8_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 << 8)) | ((value as u32 & 0x01) << 8);
self.w
}
}
#[doc = "Field `EOC9` writer - End of Conversion Interrupt Disable 9"]
pub struct EOC9_W<'a> {
w: &'a mut W,
}
impl<'a> EOC9_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 << 9)) | ((value as u32 & 0x01) << 9);
self.w
}
}
#[doc = "Field `EOC10` writer - End of Conversion Interrupt Disable 10"]
pub struct EOC10_W<'a> {
w: &'a mut W,
}
impl<'a> EOC10_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 << 10)) | ((value as u32 & 0x01) << 10);
self.w
}
}
#[doc = "Field `EOC11` writer - End of Conversion Interrupt Disable 11"]
pub struct EOC11_W<'a> {
w: &'a mut W,
}
impl<'a> EOC11_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 << 11)) | ((value as u32 & 0x01) << 11);
self.w
}
}
#[doc = "Field `DRDY` writer - Data Ready Interrupt Disable"]
pub struct DRDY_W<'a> {
w: &'a mut W,
}
impl<'a> DRDY_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 << 24)) | ((value as u32 & 0x01) << 24);
self.w
}
}
#[doc = "Field `GOVRE` writer - General Overrun Error Interrupt Disable"]
pub struct GOVRE_W<'a> {
w: &'a mut W,
}
impl<'a> GOVRE_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 << 25)) | ((value as u32 & 0x01) << 25);
self.w
}
}
#[doc = "Field `COMPE` writer - Comparison Event Interrupt Disable"]
pub struct COMPE_W<'a> {
w: &'a mut W,
}
impl<'a> COMPE_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 << 26)) | ((value as u32 & 0x01) << 26);
self.w
}
}
#[doc = "Field `TEMPCHG` writer - Temperature Change Interrupt Disable"]
pub struct TEMPCHG_W<'a> {
w: &'a mut W,
}
impl<'a> TEMPCHG_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 << 30)) | ((value as u32 & 0x01) << 30);
self.w
}
}
impl W {
#[doc = "Bit 0 - End of Conversion Interrupt Disable 0"]
#[inline(always)]
pub fn eoc0(&mut self) -> EOC0_W {
EOC0_W { w: self }
}
#[doc = "Bit 1 - End of Conversion Interrupt Disable 1"]
#[inline(always)]
pub fn eoc1(&mut self) -> EOC1_W {
EOC1_W { w: self }
}
#[doc = "Bit 2 - End of Conversion Interrupt Disable 2"]
#[inline(always)]
pub fn eoc2(&mut self) -> EOC2_W {
EOC2_W { w: self }
}
#[doc = "Bit 3 - End of Conversion Interrupt Disable 3"]
#[inline(always)]
pub fn eoc3(&mut self) -> EOC3_W {
EOC3_W { w: self }
}
#[doc = "Bit 4 - End of Conversion Interrupt Disable 4"]
#[inline(always)]
pub fn eoc4(&mut self) -> EOC4_W {
EOC4_W { w: self }
}
#[doc = "Bit 5 - End of Conversion Interrupt Disable 5"]
#[inline(always)]
pub fn eoc5(&mut self) -> EOC5_W {
EOC5_W { w: self }
}
#[doc = "Bit 6 - End of Conversion Interrupt Disable 6"]
#[inline(always)]
pub fn eoc6(&mut self) -> EOC6_W {
EOC6_W { w: self }
}
#[doc = "Bit 7 - End of Conversion Interrupt Disable 7"]
#[inline(always)]
pub fn eoc7(&mut self) -> EOC7_W {
EOC7_W { w: self }
}
#[doc = "Bit 8 - End of Conversion Interrupt Disable 8"]
#[inline(always)]
pub fn eoc8(&mut self) -> EOC8_W {
EOC8_W { w: self }
}
#[doc = "Bit 9 - End of Conversion Interrupt Disable 9"]
#[inline(always)]
pub fn eoc9(&mut self) -> EOC9_W {
EOC9_W { w: self }
}
#[doc = "Bit 10 - End of Conversion Interrupt Disable 10"]
#[inline(always)]
pub fn eoc10(&mut self) -> EOC10_W {
EOC10_W { w: self }
}
#[doc = "Bit 11 - End of Conversion Interrupt Disable 11"]
#[inline(always)]
pub fn eoc11(&mut self) -> EOC11_W {
EOC11_W { w: self }
}
#[doc = "Bit 24 - Data Ready Interrupt Disable"]
#[inline(always)]
pub fn drdy(&mut self) -> DRDY_W {
DRDY_W { w: self }
}
#[doc = "Bit 25 - General Overrun Error Interrupt Disable"]
#[inline(always)]
pub fn govre(&mut self) -> GOVRE_W {
GOVRE_W { w: self }
}
#[doc = "Bit 26 - Comparison Event Interrupt Disable"]
#[inline(always)]
pub fn compe(&mut self) -> COMPE_W {
COMPE_W { w: self }
}
#[doc = "Bit 30 - Temperature Change Interrupt Disable"]
#[inline(always)]
pub fn tempchg(&mut self) -> TEMPCHG_W {
TEMPCHG_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "AFEC Interrupt Disable Register\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [afec_idr](index.html) module"]
pub struct AFEC_IDR_SPEC;
impl crate::RegisterSpec for AFEC_IDR_SPEC {
type Ux = u32;
}
#[doc = "`write(|w| ..)` method takes [afec_idr::W](W) writer structure"]
impl crate::Writable for AFEC_IDR_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets AFEC_IDR to value 0"]
impl crate::Resettable for AFEC_IDR_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}