#[doc = "Reader of register AFEC_CECR"]
pub type R = crate::R<u32, super::AFEC_CECR>;
#[doc = "Writer for register AFEC_CECR"]
pub type W = crate::W<u32, super::AFEC_CECR>;
#[doc = "Register AFEC_CECR `reset()`'s with value 0"]
impl crate::ResetValue for super::AFEC_CECR {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0
}
}
#[doc = "Reader of field `ECORR0`"]
pub type ECORR0_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR0`"]
pub struct ECORR0_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR0_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 = "Reader of field `ECORR1`"]
pub type ECORR1_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR1`"]
pub struct ECORR1_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR1_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 = "Reader of field `ECORR2`"]
pub type ECORR2_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR2`"]
pub struct ECORR2_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR2_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 = "Reader of field `ECORR3`"]
pub type ECORR3_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR3`"]
pub struct ECORR3_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR3_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 = "Reader of field `ECORR4`"]
pub type ECORR4_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR4`"]
pub struct ECORR4_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR4_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 = "Reader of field `ECORR5`"]
pub type ECORR5_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR5`"]
pub struct ECORR5_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR5_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 = "Reader of field `ECORR6`"]
pub type ECORR6_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR6`"]
pub struct ECORR6_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR6_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 = "Reader of field `ECORR7`"]
pub type ECORR7_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR7`"]
pub struct ECORR7_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR7_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 = "Reader of field `ECORR8`"]
pub type ECORR8_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR8`"]
pub struct ECORR8_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR8_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 = "Reader of field `ECORR9`"]
pub type ECORR9_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR9`"]
pub struct ECORR9_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR9_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 = "Reader of field `ECORR10`"]
pub type ECORR10_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR10`"]
pub struct ECORR10_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR10_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 = "Reader of field `ECORR11`"]
pub type ECORR11_R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ECORR11`"]
pub struct ECORR11_W<'a> {
w: &'a mut W,
}
impl<'a> ECORR11_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
}
}
impl R {
#[doc = "Bit 0 - Error Correction Enable for channel 0"]
#[inline(always)]
pub fn ecorr0(&self) -> ECORR0_R {
ECORR0_R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - Error Correction Enable for channel 1"]
#[inline(always)]
pub fn ecorr1(&self) -> ECORR1_R {
ECORR1_R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - Error Correction Enable for channel 2"]
#[inline(always)]
pub fn ecorr2(&self) -> ECORR2_R {
ECORR2_R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - Error Correction Enable for channel 3"]
#[inline(always)]
pub fn ecorr3(&self) -> ECORR3_R {
ECORR3_R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - Error Correction Enable for channel 4"]
#[inline(always)]
pub fn ecorr4(&self) -> ECORR4_R {
ECORR4_R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - Error Correction Enable for channel 5"]
#[inline(always)]
pub fn ecorr5(&self) -> ECORR5_R {
ECORR5_R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - Error Correction Enable for channel 6"]
#[inline(always)]
pub fn ecorr6(&self) -> ECORR6_R {
ECORR6_R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - Error Correction Enable for channel 7"]
#[inline(always)]
pub fn ecorr7(&self) -> ECORR7_R {
ECORR7_R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - Error Correction Enable for channel 8"]
#[inline(always)]
pub fn ecorr8(&self) -> ECORR8_R {
ECORR8_R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - Error Correction Enable for channel 9"]
#[inline(always)]
pub fn ecorr9(&self) -> ECORR9_R {
ECORR9_R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - Error Correction Enable for channel 10"]
#[inline(always)]
pub fn ecorr10(&self) -> ECORR10_R {
ECORR10_R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - Error Correction Enable for channel 11"]
#[inline(always)]
pub fn ecorr11(&self) -> ECORR11_R {
ECORR11_R::new(((self.bits >> 11) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - Error Correction Enable for channel 0"]
#[inline(always)]
pub fn ecorr0(&mut self) -> ECORR0_W {
ECORR0_W { w: self }
}
#[doc = "Bit 1 - Error Correction Enable for channel 1"]
#[inline(always)]
pub fn ecorr1(&mut self) -> ECORR1_W {
ECORR1_W { w: self }
}
#[doc = "Bit 2 - Error Correction Enable for channel 2"]
#[inline(always)]
pub fn ecorr2(&mut self) -> ECORR2_W {
ECORR2_W { w: self }
}
#[doc = "Bit 3 - Error Correction Enable for channel 3"]
#[inline(always)]
pub fn ecorr3(&mut self) -> ECORR3_W {
ECORR3_W { w: self }
}
#[doc = "Bit 4 - Error Correction Enable for channel 4"]
#[inline(always)]
pub fn ecorr4(&mut self) -> ECORR4_W {
ECORR4_W { w: self }
}
#[doc = "Bit 5 - Error Correction Enable for channel 5"]
#[inline(always)]
pub fn ecorr5(&mut self) -> ECORR5_W {
ECORR5_W { w: self }
}
#[doc = "Bit 6 - Error Correction Enable for channel 6"]
#[inline(always)]
pub fn ecorr6(&mut self) -> ECORR6_W {
ECORR6_W { w: self }
}
#[doc = "Bit 7 - Error Correction Enable for channel 7"]
#[inline(always)]
pub fn ecorr7(&mut self) -> ECORR7_W {
ECORR7_W { w: self }
}
#[doc = "Bit 8 - Error Correction Enable for channel 8"]
#[inline(always)]
pub fn ecorr8(&mut self) -> ECORR8_W {
ECORR8_W { w: self }
}
#[doc = "Bit 9 - Error Correction Enable for channel 9"]
#[inline(always)]
pub fn ecorr9(&mut self) -> ECORR9_W {
ECORR9_W { w: self }
}
#[doc = "Bit 10 - Error Correction Enable for channel 10"]
#[inline(always)]
pub fn ecorr10(&mut self) -> ECORR10_W {
ECORR10_W { w: self }
}
#[doc = "Bit 11 - Error Correction Enable for channel 11"]
#[inline(always)]
pub fn ecorr11(&mut self) -> ECORR11_W {
ECORR11_W { w: self }
}
}