#[doc = "Reader of register APBCMASK"]
pub type R = crate::R<u32, super::APBCMASK>;
#[doc = "Writer for register APBCMASK"]
pub type W = crate::W<u32, super::APBCMASK>;
#[doc = "Register APBCMASK `reset()`'s with value 0x0001_0000"]
impl crate::ResetValue for super::APBCMASK {
type Type = u32;
#[inline(always)]
fn reset_value() -> Self::Type {
0x0001_0000
}
}
#[doc = "Reader of field `PAC2_`"]
pub type PAC2__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PAC2_`"]
pub struct PAC2__W<'a> {
w: &'a mut W,
}
impl<'a> PAC2__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 `EVSYS_`"]
pub type EVSYS__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `EVSYS_`"]
pub struct EVSYS__W<'a> {
w: &'a mut W,
}
impl<'a> EVSYS__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 `SERCOM0_`"]
pub type SERCOM0__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `SERCOM0_`"]
pub struct SERCOM0__W<'a> {
w: &'a mut W,
}
impl<'a> SERCOM0__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 `SERCOM1_`"]
pub type SERCOM1__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `SERCOM1_`"]
pub struct SERCOM1__W<'a> {
w: &'a mut W,
}
impl<'a> SERCOM1__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 `SERCOM2_`"]
pub type SERCOM2__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `SERCOM2_`"]
pub struct SERCOM2__W<'a> {
w: &'a mut W,
}
impl<'a> SERCOM2__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 `SERCOM3_`"]
pub type SERCOM3__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `SERCOM3_`"]
pub struct SERCOM3__W<'a> {
w: &'a mut W,
}
impl<'a> SERCOM3__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 `SERCOM4_`"]
pub type SERCOM4__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `SERCOM4_`"]
pub struct SERCOM4__W<'a> {
w: &'a mut W,
}
impl<'a> SERCOM4__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 `SERCOM5_`"]
pub type SERCOM5__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `SERCOM5_`"]
pub struct SERCOM5__W<'a> {
w: &'a mut W,
}
impl<'a> SERCOM5__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 `TCC0_`"]
pub type TCC0__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TCC0_`"]
pub struct TCC0__W<'a> {
w: &'a mut W,
}
impl<'a> TCC0__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 `TCC1_`"]
pub type TCC1__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TCC1_`"]
pub struct TCC1__W<'a> {
w: &'a mut W,
}
impl<'a> TCC1__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 `TCC2_`"]
pub type TCC2__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TCC2_`"]
pub struct TCC2__W<'a> {
w: &'a mut W,
}
impl<'a> TCC2__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 `TC3_`"]
pub type TC3__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TC3_`"]
pub struct TC3__W<'a> {
w: &'a mut W,
}
impl<'a> TC3__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 = "Reader of field `TC4_`"]
pub type TC4__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TC4_`"]
pub struct TC4__W<'a> {
w: &'a mut W,
}
impl<'a> TC4__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 << 12)) | (((value as u32) & 0x01) << 12);
self.w
}
}
#[doc = "Reader of field `TC5_`"]
pub type TC5__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `TC5_`"]
pub struct TC5__W<'a> {
w: &'a mut W,
}
impl<'a> TC5__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 << 13)) | (((value as u32) & 0x01) << 13);
self.w
}
}
#[doc = "Reader of field `ADC_`"]
pub type ADC__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `ADC_`"]
pub struct ADC__W<'a> {
w: &'a mut W,
}
impl<'a> ADC__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 << 16)) | (((value as u32) & 0x01) << 16);
self.w
}
}
#[doc = "Reader of field `AC_`"]
pub type AC__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `AC_`"]
pub struct AC__W<'a> {
w: &'a mut W,
}
impl<'a> AC__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 << 17)) | (((value as u32) & 0x01) << 17);
self.w
}
}
#[doc = "Reader of field `DAC_`"]
pub type DAC__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `DAC_`"]
pub struct DAC__W<'a> {
w: &'a mut W,
}
impl<'a> DAC__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 << 18)) | (((value as u32) & 0x01) << 18);
self.w
}
}
#[doc = "Reader of field `PTC_`"]
pub type PTC__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `PTC_`"]
pub struct PTC__W<'a> {
w: &'a mut W,
}
impl<'a> PTC__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 << 19)) | (((value as u32) & 0x01) << 19);
self.w
}
}
#[doc = "Reader of field `I2S_`"]
pub type I2S__R = crate::R<bool, bool>;
#[doc = "Write proxy for field `I2S_`"]
pub struct I2S__W<'a> {
w: &'a mut W,
}
impl<'a> I2S__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 << 20)) | (((value as u32) & 0x01) << 20);
self.w
}
}
impl R {
#[doc = "Bit 0 - PAC2 APB Clock Enable"]
#[inline(always)]
pub fn pac2_(&self) -> PAC2__R {
PAC2__R::new((self.bits & 0x01) != 0)
}
#[doc = "Bit 1 - EVSYS APB Clock Enable"]
#[inline(always)]
pub fn evsys_(&self) -> EVSYS__R {
EVSYS__R::new(((self.bits >> 1) & 0x01) != 0)
}
#[doc = "Bit 2 - SERCOM0 APB Clock Enable"]
#[inline(always)]
pub fn sercom0_(&self) -> SERCOM0__R {
SERCOM0__R::new(((self.bits >> 2) & 0x01) != 0)
}
#[doc = "Bit 3 - SERCOM1 APB Clock Enable"]
#[inline(always)]
pub fn sercom1_(&self) -> SERCOM1__R {
SERCOM1__R::new(((self.bits >> 3) & 0x01) != 0)
}
#[doc = "Bit 4 - SERCOM2 APB Clock Enable"]
#[inline(always)]
pub fn sercom2_(&self) -> SERCOM2__R {
SERCOM2__R::new(((self.bits >> 4) & 0x01) != 0)
}
#[doc = "Bit 5 - SERCOM3 APB Clock Enable"]
#[inline(always)]
pub fn sercom3_(&self) -> SERCOM3__R {
SERCOM3__R::new(((self.bits >> 5) & 0x01) != 0)
}
#[doc = "Bit 6 - SERCOM4 APB Clock Enable"]
#[inline(always)]
pub fn sercom4_(&self) -> SERCOM4__R {
SERCOM4__R::new(((self.bits >> 6) & 0x01) != 0)
}
#[doc = "Bit 7 - SERCOM5 APB Clock Enable"]
#[inline(always)]
pub fn sercom5_(&self) -> SERCOM5__R {
SERCOM5__R::new(((self.bits >> 7) & 0x01) != 0)
}
#[doc = "Bit 8 - TCC0 APB Clock Enable"]
#[inline(always)]
pub fn tcc0_(&self) -> TCC0__R {
TCC0__R::new(((self.bits >> 8) & 0x01) != 0)
}
#[doc = "Bit 9 - TCC1 APB Clock Enable"]
#[inline(always)]
pub fn tcc1_(&self) -> TCC1__R {
TCC1__R::new(((self.bits >> 9) & 0x01) != 0)
}
#[doc = "Bit 10 - TCC2 APB Clock Enable"]
#[inline(always)]
pub fn tcc2_(&self) -> TCC2__R {
TCC2__R::new(((self.bits >> 10) & 0x01) != 0)
}
#[doc = "Bit 11 - TC3 APB Clock Enable"]
#[inline(always)]
pub fn tc3_(&self) -> TC3__R {
TC3__R::new(((self.bits >> 11) & 0x01) != 0)
}
#[doc = "Bit 12 - TC4 APB Clock Enable"]
#[inline(always)]
pub fn tc4_(&self) -> TC4__R {
TC4__R::new(((self.bits >> 12) & 0x01) != 0)
}
#[doc = "Bit 13 - TC5 APB Clock Enable"]
#[inline(always)]
pub fn tc5_(&self) -> TC5__R {
TC5__R::new(((self.bits >> 13) & 0x01) != 0)
}
#[doc = "Bit 16 - ADC APB Clock Enable"]
#[inline(always)]
pub fn adc_(&self) -> ADC__R {
ADC__R::new(((self.bits >> 16) & 0x01) != 0)
}
#[doc = "Bit 17 - AC APB Clock Enable"]
#[inline(always)]
pub fn ac_(&self) -> AC__R {
AC__R::new(((self.bits >> 17) & 0x01) != 0)
}
#[doc = "Bit 18 - DAC APB Clock Enable"]
#[inline(always)]
pub fn dac_(&self) -> DAC__R {
DAC__R::new(((self.bits >> 18) & 0x01) != 0)
}
#[doc = "Bit 19 - PTC APB Clock Enable"]
#[inline(always)]
pub fn ptc_(&self) -> PTC__R {
PTC__R::new(((self.bits >> 19) & 0x01) != 0)
}
#[doc = "Bit 20 - I2S APB Clock Enable"]
#[inline(always)]
pub fn i2s_(&self) -> I2S__R {
I2S__R::new(((self.bits >> 20) & 0x01) != 0)
}
}
impl W {
#[doc = "Bit 0 - PAC2 APB Clock Enable"]
#[inline(always)]
pub fn pac2_(&mut self) -> PAC2__W {
PAC2__W { w: self }
}
#[doc = "Bit 1 - EVSYS APB Clock Enable"]
#[inline(always)]
pub fn evsys_(&mut self) -> EVSYS__W {
EVSYS__W { w: self }
}
#[doc = "Bit 2 - SERCOM0 APB Clock Enable"]
#[inline(always)]
pub fn sercom0_(&mut self) -> SERCOM0__W {
SERCOM0__W { w: self }
}
#[doc = "Bit 3 - SERCOM1 APB Clock Enable"]
#[inline(always)]
pub fn sercom1_(&mut self) -> SERCOM1__W {
SERCOM1__W { w: self }
}
#[doc = "Bit 4 - SERCOM2 APB Clock Enable"]
#[inline(always)]
pub fn sercom2_(&mut self) -> SERCOM2__W {
SERCOM2__W { w: self }
}
#[doc = "Bit 5 - SERCOM3 APB Clock Enable"]
#[inline(always)]
pub fn sercom3_(&mut self) -> SERCOM3__W {
SERCOM3__W { w: self }
}
#[doc = "Bit 6 - SERCOM4 APB Clock Enable"]
#[inline(always)]
pub fn sercom4_(&mut self) -> SERCOM4__W {
SERCOM4__W { w: self }
}
#[doc = "Bit 7 - SERCOM5 APB Clock Enable"]
#[inline(always)]
pub fn sercom5_(&mut self) -> SERCOM5__W {
SERCOM5__W { w: self }
}
#[doc = "Bit 8 - TCC0 APB Clock Enable"]
#[inline(always)]
pub fn tcc0_(&mut self) -> TCC0__W {
TCC0__W { w: self }
}
#[doc = "Bit 9 - TCC1 APB Clock Enable"]
#[inline(always)]
pub fn tcc1_(&mut self) -> TCC1__W {
TCC1__W { w: self }
}
#[doc = "Bit 10 - TCC2 APB Clock Enable"]
#[inline(always)]
pub fn tcc2_(&mut self) -> TCC2__W {
TCC2__W { w: self }
}
#[doc = "Bit 11 - TC3 APB Clock Enable"]
#[inline(always)]
pub fn tc3_(&mut self) -> TC3__W {
TC3__W { w: self }
}
#[doc = "Bit 12 - TC4 APB Clock Enable"]
#[inline(always)]
pub fn tc4_(&mut self) -> TC4__W {
TC4__W { w: self }
}
#[doc = "Bit 13 - TC5 APB Clock Enable"]
#[inline(always)]
pub fn tc5_(&mut self) -> TC5__W {
TC5__W { w: self }
}
#[doc = "Bit 16 - ADC APB Clock Enable"]
#[inline(always)]
pub fn adc_(&mut self) -> ADC__W {
ADC__W { w: self }
}
#[doc = "Bit 17 - AC APB Clock Enable"]
#[inline(always)]
pub fn ac_(&mut self) -> AC__W {
AC__W { w: self }
}
#[doc = "Bit 18 - DAC APB Clock Enable"]
#[inline(always)]
pub fn dac_(&mut self) -> DAC__W {
DAC__W { w: self }
}
#[doc = "Bit 19 - PTC APB Clock Enable"]
#[inline(always)]
pub fn ptc_(&mut self) -> PTC__W {
PTC__W { w: self }
}
#[doc = "Bit 20 - I2S APB Clock Enable"]
#[inline(always)]
pub fn i2s_(&mut self) -> I2S__W {
I2S__W { w: self }
}
}