#[doc = "Writer for register AFEC_IER"]
pub type W = crate::W<u32, super::AFEC_IER>;
#[doc = "Register AFEC_IER `reset()`'s with value 0"]
impl crate::ResetValue for super::AFEC_IER {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Write proxy for field `EOC0`"]
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 = "Write proxy for field `EOC1`"]
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 = "Write proxy for field `EOC2`"]
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 = "Write proxy for field `EOC3`"]
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 = "Write proxy for field `EOC4`"]
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 = "Write proxy for field `EOC5`"]
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 = "Write proxy for field `EOC6`"]
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 = "Write proxy for field `EOC7`"]
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 = "Write proxy for field `EOC8`"]
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 = "Write proxy for field `EOC9`"]
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 = "Write proxy for field `EOC10`"]
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 = "Write proxy for field `EOC11`"]
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 = "Write proxy for field `DRDY`"]
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 = "Write proxy for field `GOVRE`"]
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 = "Write proxy for field `COMPE`"]
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 = "Write proxy for field `TEMPCHG`"]
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 Enable 0"]
#[inline(always)]
pub fn eoc0(&mut self) -> EOC0_W {
EOC0_W { w: self }
}
#[doc = "Bit 1 - End of Conversion Interrupt Enable 1"]
#[inline(always)]
pub fn eoc1(&mut self) -> EOC1_W {
EOC1_W { w: self }
}
#[doc = "Bit 2 - End of Conversion Interrupt Enable 2"]
#[inline(always)]
pub fn eoc2(&mut self) -> EOC2_W {
EOC2_W { w: self }
}
#[doc = "Bit 3 - End of Conversion Interrupt Enable 3"]
#[inline(always)]
pub fn eoc3(&mut self) -> EOC3_W {
EOC3_W { w: self }
}
#[doc = "Bit 4 - End of Conversion Interrupt Enable 4"]
#[inline(always)]
pub fn eoc4(&mut self) -> EOC4_W {
EOC4_W { w: self }
}
#[doc = "Bit 5 - End of Conversion Interrupt Enable 5"]
#[inline(always)]
pub fn eoc5(&mut self) -> EOC5_W {
EOC5_W { w: self }
}
#[doc = "Bit 6 - End of Conversion Interrupt Enable 6"]
#[inline(always)]
pub fn eoc6(&mut self) -> EOC6_W {
EOC6_W { w: self }
}
#[doc = "Bit 7 - End of Conversion Interrupt Enable 7"]
#[inline(always)]
pub fn eoc7(&mut self) -> EOC7_W {
EOC7_W { w: self }
}
#[doc = "Bit 8 - End of Conversion Interrupt Enable 8"]
#[inline(always)]
pub fn eoc8(&mut self) -> EOC8_W {
EOC8_W { w: self }
}
#[doc = "Bit 9 - End of Conversion Interrupt Enable 9"]
#[inline(always)]
pub fn eoc9(&mut self) -> EOC9_W {
EOC9_W { w: self }
}
#[doc = "Bit 10 - End of Conversion Interrupt Enable 10"]
#[inline(always)]
pub fn eoc10(&mut self) -> EOC10_W {
EOC10_W { w: self }
}
#[doc = "Bit 11 - End of Conversion Interrupt Enable 11"]
#[inline(always)]
pub fn eoc11(&mut self) -> EOC11_W {
EOC11_W { w: self }
}
#[doc = "Bit 24 - Data Ready Interrupt Enable"]
#[inline(always)]
pub fn drdy(&mut self) -> DRDY_W {
DRDY_W { w: self }
}
#[doc = "Bit 25 - General Overrun Error Interrupt Enable"]
#[inline(always)]
pub fn govre(&mut self) -> GOVRE_W {
GOVRE_W { w: self }
}
#[doc = "Bit 26 - Comparison Event Interrupt Enable"]
#[inline(always)]
pub fn compe(&mut self) -> COMPE_W {
COMPE_W { w: self }
}
#[doc = "Bit 30 - Temperature Change Interrupt Enable"]
#[inline(always)]
pub fn tempchg(&mut self) -> TEMPCHG_W {
TEMPCHG_W { w: self }
}
}